本文整理匯總了C#中iTextSharp.text.pdf.PdfArray.Remove方法的典型用法代碼示例。如果您正苦於以下問題:C# PdfArray.Remove方法的具體用法?C# PdfArray.Remove怎麽用?C# PdfArray.Remove使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類iTextSharp.text.pdf.PdfArray
的用法示例。
在下文中一共展示了PdfArray.Remove方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: RemoveRefFromArray
private int RemoveRefFromArray(PdfArray array, PdfObject refo)
{
if (refo == null || !refo.IsIndirect())
return array.Size;
PdfIndirectReference refi = (PdfIndirectReference)refo;
for (int j = 0; j < array.Size; ++j) {
PdfObject obj = array[j];
if (!obj.IsIndirect())
continue;
if (((PdfIndirectReference)obj).Number == refi.Number)
array.Remove(j--);
}
return array.Size;
}
示例2: RemoveOCGsFromArray
/// <summary>
/// Searches an array for references to OCGs that need to be removed. </summary>
/// <param name="array"> the array </param>
/// <param name="ocgs"> the removal list </param>
private void RemoveOCGsFromArray(PdfArray array, ICollection<string> ocgs)
{
if (array == null)
{
return;
}
PdfObject o;
PdfDictionary dict;
IList<int?> remove = new List<int?>();
for (int i = array.Size; i > 0; )
{
o = array.GetDirectObject(--i);
if (o.IsDictionary())
{
dict = (PdfDictionary)o;
if (IsToBeRemoved(dict, ocgs))
{
remove.Add(i);
}
else
{
RemoveOCGsFromArray(dict, PdfName.OCGS, ocgs);
}
}
if (o.IsArray())
{
RemoveOCGsFromArray((PdfArray)o, ocgs);
}
}
foreach (int i in remove)
{
array.Remove(i);
}
}
示例3: RemoveInactiveReferences
private void RemoveInactiveReferences(PdfArray array, HashSet2<PdfCopy.RefKey> activeKeys) {
for (int i = 0; i < array.Size; ++i) {
PdfObject obj = array[i];
if ((obj.Type == 0 && !activeKeys.Contains(new PdfCopy.RefKey((PdfIndirectReference)obj))) ||
(obj.IsDictionary() && ContainsInactivePg((PdfDictionary)obj, activeKeys)))
array.Remove(i--);
}
}
示例4: DeleteOldReferences
private static void DeleteOldReferences(PdfArray all, PdfArray toDelete) {
if (all == null || toDelete == null)
return;
foreach (PdfObject pi in toDelete) {
if (!pi.IsIndirect())
continue;
PRIndirectReference pir = (PRIndirectReference)pi;
for (int k = 0; k < all.Size; ++k) {
PdfObject po = all[k];
if (!po.IsIndirect())
continue;
PRIndirectReference pod = (PRIndirectReference)po;
if (pir.Number == pod.Number) {
all.Remove(k);
--k;
}
}
}
}