當前位置: 首頁>>代碼示例>>C#>>正文


C# PdfArray.Remove方法代碼示例

本文整理匯總了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;
 }
開發者ID:JamieMellway,項目名稱:iTextSharpLGPL-Monotouch,代碼行數:14,代碼來源:AcroFields.cs

示例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);
     }
 }
開發者ID:,項目名稱:,代碼行數:38,代碼來源:

示例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--);
     }
 }
開發者ID:,項目名稱:,代碼行數:8,代碼來源:

示例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;
             }
         }
     }
 }
開發者ID:,項目名稱:,代碼行數:19,代碼來源:


注:本文中的iTextSharp.text.pdf.PdfArray.Remove方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。