private void CheckResourcesOfAppearanceStreams(PdfDictionary appearanceStreamsDict, ICollection <PdfObject> checkedObjects) { if (checkedObjects.Contains(appearanceStreamsDict)) { return; } else { checkedObjects.Add(appearanceStreamsDict); } foreach (PdfObject val in appearanceStreamsDict.Values()) { if (val is PdfDictionary) { PdfDictionary ap = (PdfDictionary)val; if (ap.IsDictionary()) { CheckResourcesOfAppearanceStreams(ap, checkedObjects); } else { if (ap.IsStream()) { CheckAppearanceStream((PdfStream)ap); } } } } }
private PdfObject CleverPdfDictionaryClone(PdfDictionary dict) { PdfDictionary newDict; if (dict.IsStream()) { newDict = new PdfStream(emptyByteArray); newDict.Remove(PdfName.LENGTH); } else { newDict = new PdfDictionary(); } foreach (PdfName key in dict.Keys) { if (keysForCheck.Contains(key)) { newDict.Put(key, dict.Get(key)); } } return(newDict); }
protected internal virtual void CheckResourcesOfAppearanceStreams(PdfDictionary appearanceStreamsDict) { foreach (PdfObject val in appearanceStreamsDict.Values()) { if (val is PdfDictionary) { PdfDictionary ap = (PdfDictionary)val; if (ap.IsDictionary()) { CheckResourcesOfAppearanceStreams(ap); } else { if (ap.IsStream()) { if (!IsAlreadyChecked(ap)) { CheckResources(ap.GetAsDictionary(PdfName.Resources)); } } } } } }
private PdfObject CleverPdfDictionaryClone(PdfDictionary dict) { PdfDictionary newDict; if (dict.IsStream()) { newDict = new PdfStream(emptyByteArray); newDict.Remove(PdfName.LENGTH); } else newDict = new PdfDictionary(); foreach (PdfName key in dict.Keys) if (keysForCheck.Contains(key)) newDict.Put(key, dict.Get(key)); return newDict; }