public T Wrap(PdfDirectObject baseObject) { return(PdfObjectWrapper.Wrap <T>(baseObject)); }
public override int CompareTo(PdfDirectObject obj) { return(PdfNumber.Compare(this, obj)); }
/** * <summary>Wraps an existing base array using the default wrapper for wrapping its items.</summary> * <param name="baseObject">Base array. MUST be a <see cref="PdfReference">reference</see> * everytime available.</param> */ protected Array(PdfDirectObject baseObject) : this(new DefaultWrapper <TItem>(), baseObject) { }
/** * <summary>Wraps an existing base array using the specified wrapper for wrapping its items.</summary> * <param name="itemWrapper">Item wrapper.</param> * <param name="baseObject">Base array. MUST be a <see cref="PdfReference">reference</see> * everytime available.</param> */ protected Array(IWrapper <TItem> itemWrapper, PdfDirectObject baseObject) : base(baseObject) { this.itemWrapper = itemWrapper; }
/** * <summary>Notifies a complete clone operation on an array item.</summary> * <param name="cloner">Object cloner.</param> * <param name="source">Parent source object.</param> * <param name="clone">Parent clone object.</param> * <param name="index">Item index within the parent.</param> * <param name="item">Clone item.</param> */ public virtual void AfterClone(Cloner cloner, PdfArray source, PdfArray clone, int index, PdfDirectObject item) { /* NOOP */ }
/** * <summary>Notifies a starting clone operation on a dictionary entry.</summary> * <param name="cloner">Object cloner.</param> * <param name="source">Parent source object.</param> * <param name="clone">Parent clone object.</param> * <param name="key">Entry key within the parent.</param> * <param name="value">Source value.</param> * <returns>Whether the clone operation can be fulfilled.</returns> */ public virtual bool BeforeClone(Cloner cloner, PdfDictionary source, PdfDictionary clone, PdfName key, PdfDirectObject value) { return(true); }
public override bool BeforeClone(Cloner cloner, PdfDictionary source, PdfDictionary clone, PdfName key, PdfDirectObject value) { return(!PdfName.Parent.Equals(key)); }
/** * <summary>Notifies a complete clone operation on a dictionary entry.</summary> * <param name="cloner">Object cloner.</param> * <param name="source">Parent source object.</param> * <param name="clone">Parent clone object.</param> * <param name="key">Entry key within the parent.</param> * <param name="value">Clone value.</param> */ public virtual void AfterClone(Cloner cloner, PdfDictionary source, PdfDictionary clone, PdfName key, PdfDirectObject value) { /* NOOP */ }
public override void AfterClone(Cloner cloner, PdfArray source, PdfArray clone, int index, PdfDirectObject item) { PdfDictionary annotation = (PdfDictionary)item.Resolve(); if (annotation.ContainsKey(PdfName.FT)) { cloner.context.Document.Form.Fields.Add(Field.Wrap(annotation.Reference)); } else if (annotation.ContainsKey(PdfName.Dest)) { PdfDirectObject destObject = annotation[PdfName.Dest]; if (destObject is PdfString destString) // Named destination. { CloneNamedObject <Destination>(cloner, source, destString); } } }
public override bool BeforeClone(Cloner cloner, PdfDictionary source, PdfDictionary clone, PdfName key, PdfDirectObject value) { if (key.Equals(PdfName.P)) { return(false); } return(true); }
public override void AfterClone(Cloner cloner, PdfDictionary source, PdfDictionary clone, PdfName key, PdfDirectObject value) { if (PdfName.D.Equals(key)) { PdfDirectObject destObject = clone[PdfName.D]; if (destObject is PdfString) // Named destination. { CloneNamedObject <Destination>(cloner, source, (PdfString)destObject); } } }
/** * <summary>Notifies a starting clone operation on an array item.</summary> * <param name="cloner">Object cloner.</param> * <param name="source">Parent source object.</param> * <param name="clone">Parent clone object.</param> * <param name="index">Item index within the parent.</param> * <param name="item">Source item.</param> * <returns>Whether the clone operation can be fulfilled.</returns> */ public virtual bool BeforeClone(Cloner cloner, PdfArray source, PdfArray clone, int index, PdfDirectObject item) { return(true); }
public Rectangle(PdfDirectObject baseObject) : base(Normalize((PdfArray)baseObject.Resolve())) { }
protected NameTree(PdfDirectObject baseObject) : base(baseObject) { }
public override int CompareTo(PdfDirectObject obj) { throw new NotImplementedException(); }