Class PdfTrapNetworkAnnotation
A PdfTrapNetworkAnnotation may be used to define the trapping characteristics for a page of a PDF document.
public class PdfTrapNetworkAnnotation : PdfAnnotation
- Inheritance
-
PdfTrapNetworkAnnotation
- Inherited Members
Remarks
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.Constructors
PdfTrapNetworkAnnotation(Rectangle, PdfFormXObject)
Creates a PdfTrapNetworkAnnotation instance.
public PdfTrapNetworkAnnotation(Rectangle rect, PdfFormXObject appearanceStream)
Parameters
rect
Rectanglethe annotation rectangle, defining the location of the annotation on the page in default user space units. See SetRectangle(PdfArray).
appearanceStream
PdfFormXObjectthe 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 SetProcessColorModel(PdfName). See also ISO-320001 Table 367 "Additional entries specific to a trap network appearance stream".
Remarks
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.
PdfTrapNetworkAnnotation(PdfDictionary)
Creates a PdfLineAnnotation instance from the given PdfDictionary that represents existing annotation object in the document.
protected PdfTrapNetworkAnnotation(PdfDictionary pdfObject)
Parameters
pdfObject
PdfDictionarythe PdfDictionary representing annotation object
Remarks
Creates a PdfLineAnnotation instance from the given PdfDictionary that represents existing annotation object in the document. This method is useful for property reading in reading mode or modifying in stamping mode. TrapNet annotations are deprecated in PDF 2.0.
- See Also
Methods
GetAnnotStates()
An array of name objects representing the appearance states for annotations associated with the page.
public virtual PdfArray GetAnnotStates()
Returns
- PdfArray
a PdfArray of name objects representing the appearance states for annotations associated with the page,
Remarks
An array of name objects representing the appearance states for annotations associated with the page. See also SetAnnotStates(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.
public virtual PdfArray GetFauxedFonts()
Returns
- PdfArray
a PdfArray of PdfDictionary each of which represent font in the document.
GetLastModified()
The date and time when the trap network was most recently modified.
public virtual PdfString GetLastModified()
Returns
- PdfString
a PdfString with date. The format should be a date string as described in ISO-320001 7.9.4, "Dates". See also Decode(string).
GetSubtype()
public override PdfName GetSubtype()
Returns
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.
public virtual PdfArray GetVersion()
Returns
- PdfArray
an unordered PdfArray of all objects present in the page description at the time the trap networks were generated.
SetAnnotStates(PdfArray)
An array of name objects representing the appearance states (value of the /AS entry GetAppearanceState() ) for annotations associated with the page.
public virtual PdfTrapNetworkAnnotation SetAnnotStates(PdfArray annotStates)
Parameters
annotStates
PdfArraya PdfArray of name objects representing the appearance states for annotations associated with the page.
Returns
- PdfTrapNetworkAnnotation
this PdfTrapNetworkAnnotation instance.
Remarks
An array of name objects representing the appearance states (value of the /AS entry
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
PdfNull.
No 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.
SetFauxedFonts(IList<PdfFont>)
A list of font dictionaries representing fonts that were fauxed (replaced by substitute fonts) during the generation of trap networks for the page.
public virtual PdfTrapNetworkAnnotation SetFauxedFonts(IList<PdfFont> fauxedFonts)
Parameters
Returns
- PdfTrapNetworkAnnotation
this PdfTrapNetworkAnnotation instance.
SetFauxedFonts(PdfArray)
An array of font dictionaries representing fonts that were fauxed (replaced by substitute fonts) during the generation of trap networks for the page.
public virtual PdfTrapNetworkAnnotation SetFauxedFonts(PdfArray fauxedFonts)
Parameters
fauxedFonts
PdfArraya PdfArray of PdfDictionary each of which represent font in the document.
Returns
- PdfTrapNetworkAnnotation
this PdfTrapNetworkAnnotation instance.
SetLastModified(PdfDate)
The date and time when the trap network was most recently modified.
public virtual PdfTrapNetworkAnnotation SetLastModified(PdfDate lastModified)
Parameters
Returns
- PdfTrapNetworkAnnotation
this PdfTrapNetworkAnnotation instance.
Remarks
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.SetVersion(PdfArray)
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.
public virtual PdfTrapNetworkAnnotation SetVersion(PdfArray version)
Parameters
version
PdfArrayan unordered 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
- PdfTrapNetworkAnnotation
this PdfTrapNetworkAnnotation instance.
Remarks
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.