public class PdfTrapNetworkAnnotation extends PdfAnnotation
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.
Accepted, Canceled, Completed, HIDDEN, HIGHLIGHT_INVERT, HIGHLIGHT_NONE, HIGHLIGHT_OUTLINE, HIGHLIGHT_PUSH, HIGHLIGHT_TOGGLE, INVISIBLE, LOCKED, LOCKED_CONTENTS, Marked, MarkedModel, NO_ROTATE, NO_VIEW, NO_ZOOM, None, page, PRINT, READ_ONLY, Rejected, ReviewModel, STYLE_BEVELED, STYLE_DASHED, STYLE_INSET, STYLE_SOLID, STYLE_UNDERLINE, TOGGLE_NO_VIEW, Unmarked
Modifier | Constructor and Description |
---|---|
protected |
PdfTrapNetworkAnnotation(PdfDictionary pdfObject)
Creates a PdfLineAnnotation instance from the given PdfDictionary that represents annotation object.
|
|
PdfTrapNetworkAnnotation(Rectangle rect, PdfFormXObject appearanceStream)
Creates a PdfTrapNetworkAnnotation instance.
|
Modifier and Type | Method and Description |
---|---|
PdfArray |
getAnnotStates()
An array of name objects representing the appearance states for annotations associated with the page.
|
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.
|
PdfString |
getLastModified()
The date and time when the trap network was most recently modified.
|
PdfName |
getSubtype()
Gets a PdfName which value is a subtype of this annotation.
|
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.
|
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.
|
PdfTrapNetworkAnnotation |
setFauxedFonts(List<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.
|
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.
|
PdfTrapNetworkAnnotation |
setLastModified(PdfDate lastModified)
The date and time when the trap network was most recently modified.
|
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.
|
addAssociatedFile, flush, getAppearanceDictionary, getAppearanceObject, getAppearanceState, getAssociatedFiles, getBlendMode, getBorder, getColorObject, getContents, getDate, getDownAppearanceObject, getFlags, getLang, getName, getNonStrokingOpacity, getNormalAppearanceObject, getPage, getPageObject, getRectangle, getRolloverAppearanceObject, getStrokingOpacity, getStructParentIndex, getTitle, hasFlag, isWrappedObjectMustBeIndirect, makeAnnotation, put, remove, resetFlag, setAppearance, setAppearance, setAppearanceState, setBlendMode, setBorder, setBorder, setColor, setColor, setColor, setContents, setContents, setDate, setDownAppearance, setDownAppearance, setFlag, setFlags, setLang, setLayer, setName, setNonStrokingOpacity, setNormalAppearance, setNormalAppearance, setPage, setRectangle, setRolloverAppearance, setRolloverAppearance, setStrokingOpacity, setStructParentIndex, setTitle
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
public PdfTrapNetworkAnnotation(Rectangle rect, PdfFormXObject appearanceStream)
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.
rect
- the annotation rectangle, defining the location of the annotation on the page in default user space units. See PdfAnnotation.setRectangle(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 PdfFormXObject.setProcessColorModel(PdfName)
. See also ISO-320001 Table 367 "Additional entries specific to a trap network appearance stream".
protected PdfTrapNetworkAnnotation(PdfDictionary pdfObject)
PdfLineAnnotation
instance from the given PdfDictionary
that represents annotation object. This method is useful for property reading in reading mode or modifying in stamping mode. TrapNet annotations are deprecated in PDF 2.0.
pdfObject
- a PdfDictionary
that represents existing annotation in the document. see PdfAnnotation.makeAnnotation(PdfObject)
public PdfName getSubtype()
PdfName
which value is a subtype of this annotation. See ISO-320001 12.5.6, "Annotation Types" for the reference to the possible types.
getSubtype
in class PdfAnnotation
public PdfTrapNetworkAnnotation setLastModified(PdfDate lastModified)
This entry is required if /Version (getVersion()
) and /AnnotStates (getAnnotStates()
) entries are absent; shall be absent if /Version and /AnnotStates entries are present.
lastModified
- a PdfDate
wrapper with the specified date.
PdfTrapNetworkAnnotation
instance.
public PdfString getLastModified()
PdfString
with date. The format should be a date string as described in ISO-320001 7.9.4, "Dates". See also PdfDate.decode(String)
.
public PdfTrapNetworkAnnotation setVersion(PdfArray version)
This entry is required if /AnnotStates (getAnnotStates()
) is present; shall be absent if /LastModified (getLastModified()
) is present.
version
- an 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:
PdfTrapNetworkAnnotation
instance.
public PdfArray getVersion()
PdfArray
of all objects present in the page description at the time the trap networks were generated.
public PdfTrapNetworkAnnotation setAnnotStates(PdfArray annotStates)
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 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.
annotStates
- a PdfArray
of name objects representing the appearance states for annotations associated with the page.
PdfTrapNetworkAnnotation
instance.
public PdfArray getAnnotStates()
setAnnotStates(PdfArray)
.
PdfArray
of name objects representing the appearance states for annotations associated with the page,
public PdfTrapNetworkAnnotation setFauxedFonts(PdfArray fauxedFonts)
fauxedFonts
- a PdfArray
of PdfDictionary
each of which represent font in the document.
PdfTrapNetworkAnnotation
instance.
public PdfTrapNetworkAnnotation setFauxedFonts(List<PdfFont> fauxedFonts)
fauxedFonts
- a List
of PdfFont
objects.
PdfTrapNetworkAnnotation
instance.
public PdfArray getFauxedFonts()
PdfArray
of PdfDictionary
each of which represent font in the document.
Copyright © 1998–2020 iText Group NV. All rights reserved.