iText 7 7.1.8 API
iText.Kernel.Pdf.Annot.PdfTrapNetworkAnnotation Class Reference

A PdfTrapNetworkAnnotation may be used to define the trapping characteristics for a page of a PDF document. Trapping is the process of adding marks to a page along colour boundaries to avoid unwanted visual artifacts resulting from misregistration of colorants when the page is printed. TrapNet annotations are deprecated in PDF 2.0. More...

Inheritance diagram for iText.Kernel.Pdf.Annot.PdfTrapNetworkAnnotation:
iText.Kernel.Pdf.Annot.PdfAnnotation iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary >

Public Member Functions

  PdfTrapNetworkAnnotation (Rectangle rect, PdfFormXObject appearanceStream)
  Creates a PdfTrapNetworkAnnotation instance. Note that there shall be at most one trap network annotation per page, which shall be the last element in the page’s Annots array. TrapNet annotations are deprecated in PDF 2.0. More...
 
override PdfName  GetSubtype ()
  Gets a iText.Kernel.Pdf.PdfName which value is a subtype of this annotation. See ISO-320001 12.5.6, "Annotation Types" for the reference to the possible types. More...
 
virtual iText.Kernel.Pdf.Annot.PdfTrapNetworkAnnotation  SetLastModified (PdfDate lastModified)
  The date and time when the trap network was most recently modified. More...
 
virtual PdfString  GetLastModified ()
  The date and time when the trap network was most recently modified. More...
 
virtual iText.Kernel.Pdf.Annot.PdfTrapNetworkAnnotation  SetVersion (PdfArray version)
  An unordered array of all objects present in the page description at the time the trap networks were generated and that, if changed, could affect the appearance of the page. More...
 
virtual PdfArray  GetVersion ()
  An unordered array of all objects present in the page description at the time the trap networks were generated and that, if changed, could affect the appearance of the page. More...
 
virtual iText.Kernel.Pdf.Annot.PdfTrapNetworkAnnotation  SetAnnotStates (PdfArray annotStates)
  An array of name objects representing the appearance states (value of the /AS entry PdfAnnotation.GetAppearanceState() ) for annotations associated with the page. The appearance states shall be listed in the same order as the annotations in the page’s /Annots array. For an annotation with no /AS entry, the corresponding array element should be iText.Kernel.Pdf.PdfNullNo appearance state shall be included for the trap network annotation itself. More...
 
virtual PdfArray  GetAnnotStates ()
  An array of name objects representing the appearance states for annotations associated with the page. More...
 
virtual iText.Kernel.Pdf.Annot.PdfTrapNetworkAnnotation  SetFauxedFonts (PdfArray fauxedFonts)
  An array of font dictionaries representing fonts that were fauxed (replaced by substitute fonts) during the generation of trap networks for the page. More...
 
virtual iText.Kernel.Pdf.Annot.PdfTrapNetworkAnnotation  SetFauxedFonts (IList< PdfFont > fauxedFonts)
  A list of font dictionaries representing fonts that were fauxed (replaced by substitute fonts) during the generation of trap networks for the page. More...
 
virtual PdfArray  GetFauxedFonts ()
  An array of font dictionaries representing fonts that were fauxed (replaced by substitute fonts) during the generation of trap networks for the page. More...
 
- Public Member Functions inherited from iText.Kernel.Pdf.Annot.PdfAnnotation
virtual void  SetLayer (IPdfOCG layer)
  Sets the layer this annotation belongs to. More...
 
virtual PdfString  GetContents ()
  Gets the text that shall be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation’s contents in human-readable form. More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetContents (PdfString contents)
  Sets the text that shall be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation’s contents in human-readable form. More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetContents (String contents)
  Sets the text that shall be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation’s contents in human-readable form. More...
 
virtual PdfDictionary  GetPageObject ()
  Gets a iText.Kernel.Pdf.PdfDictionary that represents a page of the document on which annotation is placed, i.e. which has this annotation in it's /Annots array. More...
 
virtual PdfPage  GetPage ()
  Gets a iText.Kernel.Pdf.PdfPage on which annotation is placed. More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetPage (PdfPage page)
  Method that modifies annotation page property, which defines to which page annotation belongs. More...
 
virtual PdfString  GetName ()
  Gets the annotation name, a text string uniquely identifying it among all the annotations on its page. More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetName (PdfString name)
  Sets the annotation name, a text string uniquely identifying it among all the annotations on its page. More...
 
virtual PdfString  GetDate ()
  The date and time when the annotation was most recently modified. More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetDate (PdfString date)
  The date and time when the annotation was most recently modified. More...
 
virtual int  GetFlags ()
  A set of flags specifying various characteristics of the annotation (see ISO-320001 12.5.3, "Annotation Flags"). More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetFlags (int flags)
  Sets a set of flags specifying various characteristics of the annotation (see ISO-320001 12.5.3, "Annotation Flags"). More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetFlag (int flag)
  Sets a flag that specifies a characteristic of the annotation to enabled state (see ISO-320001 12.5.3, "Annotation Flags"). More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  ResetFlag (int flag)
  Resets a flag that specifies a characteristic of the annotation to disabled state (see ISO-320001 12.5.3, "Annotation Flags"). More...
 
virtual bool  HasFlag (int flag)
  Checks if the certain flag that specifies a characteristic of the annotation is in enabled state (see ISO-320001 12.5.3, "Annotation Flags"). More...
 
virtual PdfDictionary  GetAppearanceDictionary ()
  An appearance dictionary specifying how the annotation shall be presented visually on the page during its interactions with the user (see ISO-320001 12.5.5, "Appearance Streams"). More...
 
virtual PdfDictionary  GetAppearanceObject (PdfName appearanceType)
  Specific appearance object corresponding to the specific appearance type. More...
 
virtual PdfDictionary  GetNormalAppearanceObject ()
  The normal appearance is used when the annotation is not interacting with the user. More...
 
virtual PdfDictionary  GetRolloverAppearanceObject ()
  The rollover appearance is used when the user moves the cursor into the annotation’s active area without pressing the mouse button. More...
 
virtual PdfDictionary  GetDownAppearanceObject ()
  The down appearance is used when the mouse button is pressed or held down within the annotation’s active area. More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetAppearance (PdfName appearanceType, PdfDictionary appearance)
  Sets a specific type of the appearance. More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetNormalAppearance (PdfDictionary appearance)
  Sets normal appearance. More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetRolloverAppearance (PdfDictionary appearance)
  Sets rollover appearance. More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetDownAppearance (PdfDictionary appearance)
  Sets down appearance. More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetAppearance (PdfName appearanceType, PdfAnnotationAppearance appearance)
  Sets a specific type of the appearance using PdfAnnotationAppearance wrapper. This method is used to set only an appearance subdictionary. See GetAppearanceObject(iText.Kernel.Pdf.PdfName) and GetAppearanceDictionary() for more info. More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetNormalAppearance (PdfAnnotationAppearance appearance)
  Sets normal appearance using PdfAnnotationAppearance wrapper. This method is used to set only appearance subdictionary. See GetNormalAppearanceObject() and GetAppearanceDictionary() for more info. More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetRolloverAppearance (PdfAnnotationAppearance appearance)
  Sets rollover appearance using PdfAnnotationAppearance wrapper. This method is used to set only appearance subdictionary. See GetRolloverAppearanceObject() and GetAppearanceDictionary() for more info. More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetDownAppearance (PdfAnnotationAppearance appearance)
  Sets down appearance using PdfAnnotationAppearance wrapper. This method is used to set only appearance subdictionary. See GetDownAppearanceObject() and GetAppearanceDictionary() for more info. More...
 
virtual PdfName  GetAppearanceState ()
  The annotation’s appearance state, which selects the applicable appearance stream from an appearance subdictionary if there is such. More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetAppearanceState (PdfName @as)
  Sets the annotation’s appearance state, which selects the applicable appearance stream from an appearance subdictionary. More...
 
virtual PdfArray  GetBorder ()
  An array specifying the characteristics of the annotation’s border. More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetBorder (PdfAnnotationBorder border)
  Sets the characteristics of the annotation’s border. More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetBorder (PdfArray border)
  Sets the characteristics of the annotation’s border. More...
 
virtual PdfArray  GetColorObject ()
  An array of numbers in the range 0.0 to 1.0, representing a colour used for the following purposes: More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetColor (PdfArray color)
  Sets an annotation color. More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetColor (float[] color)
  Sets an annotation color. More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetColor (Color color)
  Sets an annotation color. More...
 
virtual int  GetStructParentIndex ()
  The integer key of the annotation’s entry in the structural parent tree (see ISO-320001 14.7.4.4, "Finding Structure Elements from Content Items"). More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetStructParentIndex (int structParentIndex)
  Sets he integer key of the annotation’s entry in the structural parent tree (see ISO-320001 14.7.4.4, "Finding Structure Elements from Content Items"). More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetTitle (PdfString title)
  Sets annotation title. More...
 
virtual PdfString  GetTitle ()
  Annotation title. More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetRectangle (PdfArray array)
  The annotation rectangle, defining the location of the annotation on the page in default user space units. More...
 
virtual PdfArray  GetRectangle ()
  The annotation rectangle, defining the location of the annotation on the page in default user space units. More...
 
virtual String  GetLang ()
  PDF 2.0. More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetLang (String lang)
  PDF 2.0. More...
 
virtual PdfName  GetBlendMode ()
  PDF 2.0. More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetBlendMode (PdfName blendMode)
  PDF 2.0. More...
 
virtual float  GetNonStrokingOpacity ()
  PDF 2.0. More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetNonStrokingOpacity (float nonStrokingOpacity)
  PDF 2.0. More...
 
virtual float  GetStrokingOpacity ()
  PDF 2.0. More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  SetStrokingOpacity (float strokingOpacity)
  PDF 2.0. More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  Put (PdfName key, PdfObject value)
  Inserts the value into into the underlying iText.Kernel.Pdf.PdfDictionary of this PdfAnnotation and associates it with the specified key. If the key is already present in this PdfAnnotation , this method will override the old value with the specified one. More...
 
virtual iText.Kernel.Pdf.Annot.PdfAnnotation  Remove (PdfName key)
  Removes the specified key from the underlying iText.Kernel.Pdf.PdfDictionary of this PdfAnnotation More...
 
virtual void  AddAssociatedFile (PdfFileSpec fs)
 
virtual PdfArray  GetAssociatedFiles (bool create)
  Returns files associated with PDF annotation. More...
 
override void  Flush ()
  To manually flush a PdfObject behind this wrapper, you have to ensure that this object is added to the document, i.e. it has an indirect reference. Basically this means that before flushing you need to explicitly call iText.Kernel.Pdf.PdfObjectWrapper.MakeIndirect(iText.Kernel.Pdf.PdfDocument)For example: wrapperInstance.makeIndirect(document).flush(); Note that not every wrapper require this, only those that have such warning in documentation. More...
 
- Public Member Functions inherited from iText.Kernel.Pdf.PdfObjectWrapper< PdfDictionary >
virtual T  GetPdfObject ()
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  MakeIndirect (PdfDocument document, PdfIndirectReference reference)
  Marks object behind wrapper to be saved as indirect. More...
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  MakeIndirect (PdfDocument document)
  Marks object behind wrapper to be saved as indirect. More...
 
virtual iText.Kernel.Pdf.PdfObjectWrapper< T >  SetModified ()
 
virtual bool  IsFlushed ()
 

Additional Inherited Members

- Static Public Member Functions inherited from iText.Kernel.Pdf.Annot.PdfAnnotation
static iText.Kernel.Pdf.Annot.PdfAnnotation  MakeAnnotation (PdfObject pdfObject)
  Factory method that creates the type specific PdfAnnotation from the given iText.Kernel.Pdf.PdfObject that represents annotation object. This method is useful for property reading in reading mode or modifying in stamping mode. See derived classes of this class to see possible specific annotation types created. More...
 
- Static Public Attributes inherited from iText.Kernel.Pdf.Annot.PdfAnnotation
const int  INVISIBLE = 1
  Annotation flag. More...
 
const int  HIDDEN = 2
  Annotation flag. More...
 
const int  PRINT = 4
  Annotation flag. More...
 
const int  NO_ZOOM = 8
  Annotation flag. More...
 
const int  NO_ROTATE = 16
  Annotation flag. More...
 
const int  NO_VIEW = 32
  Annotation flag. More...
 
const int  READ_ONLY = 64
  Annotation flag. More...
 
const int  LOCKED = 128
  Annotation flag. More...
 
const int  TOGGLE_NO_VIEW = 256
  Annotation flag. More...
 
const int  LOCKED_CONTENTS = 512
  Annotation flag. More...
 
static readonly PdfName  HIGHLIGHT_NONE = PdfName.N
  Widget annotation highlighting mode. More...
 
static readonly PdfName  HIGHLIGHT_INVERT = PdfName.I
  Widget annotation highlighting mode. More...
 
static readonly PdfName  HIGHLIGHT_OUTLINE = PdfName.O
  Widget annotation highlighting mode. More...
 
static readonly PdfName  HIGHLIGHT_PUSH = PdfName.P
  Widget annotation highlighting mode. More...
 
static readonly PdfName  HIGHLIGHT_TOGGLE = PdfName.T
  Widget annotation highlighting mode. More...
 
static readonly PdfName  STYLE_SOLID = PdfName.S
  Annotation border style. More...
 
static readonly PdfName  STYLE_DASHED = PdfName.D
  Annotation border style. More...
 
static readonly PdfName  STYLE_BEVELED = PdfName.B
  Annotation border style. More...
 
static readonly PdfName  STYLE_INSET = PdfName.I
  Annotation border style. More...
 
static readonly PdfName  STYLE_UNDERLINE = PdfName.U
  Annotation border style. More...
 
static readonly PdfString  Marked = new PdfString("Marked")
  Annotation state. More...
 
static readonly PdfString  Unmarked = new PdfString("Unmarked")
  Annotation state. More...
 
static readonly PdfString  Accepted = new PdfString("Accepted")
  Annotation state. More...
 
static readonly PdfString  Rejected = new PdfString("Rejected")
  Annotation state. More...
 
static readonly PdfString  Canceled = new PdfString("Cancelled")
  Annotation state. More...
 
static readonly PdfString  Completed = new PdfString("Completed")
  Annotation state. More...
 
static readonly PdfString  None = new PdfString("None")
  Annotation state. More...
 
static readonly PdfString  MarkedModel = new PdfString("Marked")
  Annotation state model. More...
 
static readonly PdfString  ReviewModel = new PdfString("Review")
  Annotation state model. More...
 

Detailed Description

A PdfTrapNetworkAnnotation may be used to define the trapping characteristics for a page of a PDF document. Trapping is the process of adding marks to a page along colour boundaries to avoid unwanted visual artifacts resulting from misregistration of colorants when the page is printed. TrapNet annotations are deprecated in PDF 2.0.

See ISO-320001 14.11.6 "Trapping Support" and 14.11.6.2 "Trap Network Annotations" in particular.

Constructor & Destructor Documentation

◆ PdfTrapNetworkAnnotation()

iText.Kernel.Pdf.Annot.PdfTrapNetworkAnnotation.PdfTrapNetworkAnnotation ( Rectangle  rect,
PdfFormXObject  appearanceStream 
)
inline

Creates a PdfTrapNetworkAnnotation instance. Note that there shall be at most one trap network annotation per page, which shall be the last element in the page’s Annots array. TrapNet annotations are deprecated in PDF 2.0.

Parameters
rect the annotation rectangle, defining the location of the annotation on the page in default user space units. See PdfAnnotation.SetRectangle(iText.Kernel.Pdf.PdfArray)
appearanceStream the form XObject defining a trap network which body contains the graphics objects needed to paint the traps making up the trap network. Process colour model shall be defined for the appearance stream (see iText.Kernel.Pdf.Xobject.PdfFormXObject.SetProcessColorModel(iText.Kernel.Pdf.PdfName)See also ISO-320001 Table 367 "Additional entries specific to a trap network appearance stream".

Member Function Documentation

◆ GetAnnotStates()

virtual PdfArray iText.Kernel.Pdf.Annot.PdfTrapNetworkAnnotation.GetAnnotStates ( )
inlinevirtual

An array of name objects representing the appearance states for annotations associated with the page.

An array of name objects representing the appearance states for annotations associated with the page. See also SetAnnotStates(iText.Kernel.Pdf.PdfArray)

Returns
a iText.Kernel.Pdf.PdfArray of name objects representing the appearance states for annotations associated with the page,

◆ GetFauxedFonts()

virtual PdfArray iText.Kernel.Pdf.Annot.PdfTrapNetworkAnnotation.GetFauxedFonts ( )
inlinevirtual

An array of font dictionaries representing fonts that were fauxed (replaced by substitute fonts) during the generation of trap networks for the page.

Returns
a iText.Kernel.Pdf.PdfArray of iText.Kernel.Pdf.PdfDictionary each of which represent font in the document.

◆ GetLastModified()

virtual PdfString iText.Kernel.Pdf.Annot.PdfTrapNetworkAnnotation.GetLastModified ( )
inlinevirtual

The date and time when the trap network was most recently modified.

Returns
a iText.Kernel.Pdf.PdfString with date. The format should be a date string as described in ISO-320001 7.9.4, "Dates". See also iText.Kernel.Pdf.PdfDate.Decode(System.String)

◆ GetSubtype()

override PdfName iText.Kernel.Pdf.Annot.PdfTrapNetworkAnnotation.GetSubtype ( )
inlinevirtual

Gets a iText.Kernel.Pdf.PdfName which value is a subtype of this annotation. See ISO-320001 12.5.6, "Annotation Types" for the reference to the possible types.

Implements iText.Kernel.Pdf.Annot.PdfAnnotation.

◆ GetVersion()

virtual PdfArray iText.Kernel.Pdf.Annot.PdfTrapNetworkAnnotation.GetVersion ( )
inlinevirtual

An unordered array of all objects present in the page description at the time the trap networks were generated and that, if changed, could affect the appearance of the page.

Returns
an unordered iText.Kernel.Pdf.PdfArray of all objects present in the page description at the time the trap networks were generated.

◆ SetAnnotStates()

virtual iText.Kernel.Pdf.Annot.PdfTrapNetworkAnnotation iText.Kernel.Pdf.Annot.PdfTrapNetworkAnnotation.SetAnnotStates ( PdfArray  annotStates )
inlinevirtual

An array of name objects representing the appearance states (value of the /AS entry PdfAnnotation.GetAppearanceState() ) for annotations associated with the page. The appearance states shall be listed in the same order as the annotations in the page’s /Annots array. For an annotation with no /AS entry, the corresponding array element should be iText.Kernel.Pdf.PdfNullNo appearance state shall be included for the trap network annotation itself.

Required if /Version ( GetVersion() ) is present; shall be absent if /LastModified GetLastModified() is present.

Parameters
annotStates a iText.Kernel.Pdf.PdfArray of name objects representing the appearance states for annotations associated with the page.
Returns
this PdfTrapNetworkAnnotation instance.

◆ SetFauxedFonts() [1/2]

virtual iText.Kernel.Pdf.Annot.PdfTrapNetworkAnnotation iText.Kernel.Pdf.Annot.PdfTrapNetworkAnnotation.SetFauxedFonts ( IList< PdfFont fauxedFonts )
inlinevirtual

A list of font dictionaries representing fonts that were fauxed (replaced by substitute fonts) during the generation of trap networks for the page.

Parameters
fauxedFonts a System.Collections.IList of iText.Kernel.Font.PdfFont objects.
Returns
this PdfTrapNetworkAnnotation instance.

◆ SetFauxedFonts() [2/2]

virtual iText.Kernel.Pdf.Annot.PdfTrapNetworkAnnotation iText.Kernel.Pdf.Annot.PdfTrapNetworkAnnotation.SetFauxedFonts ( PdfArray  fauxedFonts )
inlinevirtual

An array of font dictionaries representing fonts that were fauxed (replaced by substitute fonts) during the generation of trap networks for the page.

Parameters
fauxedFonts a iText.Kernel.Pdf.PdfArray of iText.Kernel.Pdf.PdfDictionary each of which represent font in the document.
Returns
this PdfTrapNetworkAnnotation instance.

◆ SetLastModified()

virtual iText.Kernel.Pdf.Annot.PdfTrapNetworkAnnotation iText.Kernel.Pdf.Annot.PdfTrapNetworkAnnotation.SetLastModified ( PdfDate  lastModified )
inlinevirtual

The date and time when the trap network was most recently modified.

The date and time when the trap network was most recently modified.

This entry is required if /Version ( GetVersion() ) and /AnnotStates ( GetAnnotStates() ) entries are absent; shall be absent if /Version and /AnnotStates entries are present.

Parameters
lastModified a iText.Kernel.Pdf.PdfDate wrapper with the specified date.
Returns
this PdfTrapNetworkAnnotation instance.

◆ SetVersion()

virtual iText.Kernel.Pdf.Annot.PdfTrapNetworkAnnotation iText.Kernel.Pdf.Annot.PdfTrapNetworkAnnotation.SetVersion ( PdfArray  version )
inlinevirtual

An unordered array of all objects present in the page description at the time the trap networks were generated and that, if changed, could affect the appearance of the page.

An unordered array of all objects present in the page description at the time the trap networks were generated and that, if changed, could affect the appearance of the page.

This entry is required if /AnnotStates ( GetAnnotStates() ) is present; shall be absent if /LastModified ( GetLastModified() ) is present.

Parameters
version an unordered iText.Kernel.Pdf.PdfArray of all objects present in the page description at the time the trap networks were generated. If present, the array shall include the following objects:
  • all page content streams;
  • all page resource objects (other than procedure sets);
  • all resource objects (other than procedure sets) of any form XObjects on the page;
  • all OPI dictionaries associated with XObjects on the page (see ISO-320001 14.11.7, "Open Prepress Interface (OPI)")
Returns
this PdfTrapNetworkAnnotation instance.