public class PdfTextMarkupAnnotation extends PdfMarkupAnnotation
Modifier and Type | Field and Description |
---|---|
static PdfName |
MarkupHighlight
Subtypes
|
static PdfName |
MarkupSquiggly |
static PdfName |
MarkupStrikeout |
static PdfName |
MarkupUnderline |
inReplyTo, popup
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
Constructor and Description |
---|
PdfTextMarkupAnnotation(PdfDictionary pdfObject)
Deprecated.
Use
PdfAnnotation.makeAnnotation(PdfObject) instead. Will be made protected in 7.1
|
PdfTextMarkupAnnotation(Rectangle rect, PdfName subtype, float[] quadPoints) |
Modifier and Type | Method and Description |
---|---|
static PdfTextMarkupAnnotation |
createHighLight(Rectangle rect, float[] quadPoints)
Creates a text markup annotation of highlight style subtype.
|
static PdfTextMarkupAnnotation |
createSquiggly(Rectangle rect, float[] quadPoints)
Creates a text markup annotation of squiggly-underline type.
|
static PdfTextMarkupAnnotation |
createStrikeout(Rectangle rect, float[] quadPoints)
Creates a text markup annotation of strikeout style subtype.
|
static PdfTextMarkupAnnotation |
createUnderline(Rectangle rect, float[] quadPoints)
Creates a text markup annotation of underline style subtype.
|
PdfArray |
getQuadPoints()
An array of 8 × n numbers specifying the coordinates of n quadrilaterals in default user space.
|
PdfName |
getSubtype()
Gets a PdfName which value is a subtype of this annotation.
|
PdfTextMarkupAnnotation |
setQuadPoints(PdfArray quadPoints)
Sets n quadrilaterals in default user space by passing an PdfArray of 8 × n numbers.
|
getBorderEffect, getCreationDate, getDefaultAppearance, getExternalData, getIconName, getInReplyTo, getInReplyToObject, getIntent, getInteriorColor, getJustification, getOpacity, getPopup, getPopupObject, getRectangleDifferences, getReplyType, getRichText, getSubject, getText, setBorderEffect, setCreationDate, setDefaultAppearance, setExternalData, setIconName, setInReplyTo, setIntent, setInteriorColor, setInteriorColor, setJustification, setOpacity, setPopup, setRectangleDifferences, setReplyType, setRichText, setSubject, setText
flush, getAction, getAdditionalAction, getAppearanceCharacteristics, getAppearanceDictionary, getAppearanceObject, getAppearanceState, getBorder, getBorderStyle, getColorObject, getContents, getDate, getDownAppearanceObject, getFlags, getName, getNormalAppearanceObject, getOpen, getPage, getPageObject, getRectangle, getRolloverAppearanceObject, getStructParentIndex, getTitle, hasFlag, isWrappedObjectMustBeIndirect, makeAnnotation, makeAnnotation, put, remove, resetFlag, setAction, setAdditionalAction, setAppearance, setAppearance, setAppearanceCharacteristics, setAppearanceState, setBorder, setBorderStyle, setBorderStyle, setColor, setColor, setColor, setContents, setContents, setDashPattern, setDate, setDownAppearance, setDownAppearance, setFlag, setFlags, setLayer, setName, setNormalAppearance, setNormalAppearance, setOpen, setPage, setRectangle, setRolloverAppearance, setRolloverAppearance, setStructParentIndex, setTitle
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
public static final PdfName MarkupHighlight
public static final PdfName MarkupUnderline
public static final PdfName MarkupStrikeout
public static final PdfName MarkupSquiggly
public PdfTextMarkupAnnotation(Rectangle rect, PdfName subtype, float[] quadPoints)
@Deprecated public PdfTextMarkupAnnotation(PdfDictionary pdfObject)
PdfAnnotation.makeAnnotation(PdfObject)
instead. Will be made protected in 7.1
pdfObject
- object representing this annotation
public static PdfTextMarkupAnnotation createHighLight(Rectangle rect, float[] quadPoints)
IMPORTANT NOTE on quadPoints argument: According to Table 179 in ISO 32000-1, the QuadPoints array lists the vertices in counterclockwise order and the text orientation is defined by the first and second vertex. This basically means QuadPoints is specified as lower-left, lower-right, top-right, top-left. HOWEVER, Adobe's interpretation (tested at least with Acrobat 10, Acrobat 11, Reader 11) is top-left, top-right, lower-left, lower-right (Z-shaped order). This means that if the QuadPoints array is specified according to the standard, the rendering is not as expected. Other viewers seem to follow Adobe's interpretation. Hence we recommend to use and expect QuadPoints array in Z-order, just as Acrobat and probably most other viewers expect.
rect
- the annotation rectangle, defining the location of the annotation on the page in default user space units.
quadPoints
- An array of 8 × n numbers specifying the coordinates of n quadrilaterals in default user space. Each quadrilateral shall encompasses a word or group of contiguous words in the text underlying the annotation. The text is oriented with respect to the edge connecting first two vertices.
PdfTextMarkupAnnotation
of Highlight type.
public static PdfTextMarkupAnnotation createUnderline(Rectangle rect, float[] quadPoints)
IMPORTANT NOTE on quadPoints argument: According to Table 179 in ISO 32000-1, the QuadPoints array lists the vertices in counterclockwise order and the text orientation is defined by the first and second vertex. This basically means QuadPoints is specified as lower-left, lower-right, top-right, top-left. HOWEVER, Adobe's interpretation (tested at least with Acrobat 10, Acrobat 11, Reader 11) is top-left, top-right, lower-left, lower-right (Z-shaped order). This means that if the QuadPoints array is specified according to the standard, the rendering is not as expected. Other viewers seem to follow Adobe's interpretation. Hence we recommend to use and expect QuadPoints array in Z-order, just as Acrobat and probably most other viewers expect.
rect
- the annotation rectangle, defining the location of the annotation on the page in default user space units.
quadPoints
- An array of 8 × n numbers specifying the coordinates of n quadrilaterals in default user space. Each quadrilateral shall encompasses a word or group of contiguous words in the text underlying the annotation. The text is oriented with respect to the edge connecting first two vertices.
PdfTextMarkupAnnotation
of Underline type.
public static PdfTextMarkupAnnotation createStrikeout(Rectangle rect, float[] quadPoints)
IMPORTANT NOTE on quadPoints argument: According to Table 179 in ISO 32000-1, the QuadPoints array lists the vertices in counterclockwise order and the text orientation is defined by the first and second vertex. This basically means QuadPoints is specified as lower-left, lower-right, top-right, top-left. HOWEVER, Adobe's interpretation (tested at least with Acrobat 10, Acrobat 11, Reader 11) is top-left, top-right, lower-left, lower-right (Z-shaped order). This means that if the QuadPoints array is specified according to the standard, the rendering is not as expected. Other viewers seem to follow Adobe's interpretation. Hence we recommend to use and expect QuadPoints array in Z-order, just as Acrobat and probably most other viewers expect.
rect
- the annotation rectangle, defining the location of the annotation on the page in default user space units.
quadPoints
- An array of 8 × n numbers specifying the coordinates of n quadrilaterals in default user space. Each quadrilateral shall encompasses a word or group of contiguous words in the text underlying the annotation. The text is oriented with respect to the edge connecting first two vertices.
PdfTextMarkupAnnotation
of Strikeout type.
public static PdfTextMarkupAnnotation createSquiggly(Rectangle rect, float[] quadPoints)
IMPORTANT NOTE on quadPoints argument: According to Table 179 in ISO 32000-1, the QuadPoints array lists the vertices in counterclockwise order and the text orientation is defined by the first and second vertex. This basically means QuadPoints is specified as lower-left, lower-right, top-right, top-left. HOWEVER, Adobe's interpretation (tested at least with Acrobat 10, Acrobat 11, Reader 11) is top-left, top-right, lower-left, lower-right (Z-shaped order). This means that if the QuadPoints array is specified according to the standard, the rendering is not as expected. Other viewers seem to follow Adobe's interpretation. Hence we recommend to use and expect QuadPoints array in Z-order, just as Acrobat and probably most other viewers expect.
rect
- the annotation rectangle, defining the location of the annotation on the page in default user space units.
quadPoints
- An array of 8 × n numbers specifying the coordinates of n quadrilaterals in default user space. Each quadrilateral shall encompasses a word or group of contiguous words in the text underlying the annotation. The text is oriented with respect to the edge connecting first two vertices.
PdfTextMarkupAnnotation
of squiggly-underline type.
public PdfName getSubtype()
PdfAnnotation
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 PdfArray getQuadPoints()
IMPORTANT NOTE: According to Table 179 in ISO 32000-1, the QuadPoints array lists the vertices in counterclockwise order and the text orientation is defined by the first and second vertex. This basically means QuadPoints is specified as lower-left, lower-right, top-right, top-left. HOWEVER, Adobe's interpretation (tested at least with Acrobat 10, Acrobat 11, Reader 11) is top-left, top-right, lower-left, lower-right (Z-shaped order). This means that if the QuadPoints array is specified according to the standard, the rendering is not as expected. Other viewers seem to follow Adobe's interpretation. Hence we recommend to use and expect QuadPoints array in Z-order, just as Acrobat and probably most other viewers expect.
getQuadPoints
in class PdfAnnotation
PdfArray
of 8 × n numbers specifying the coordinates of n quadrilaterals.
public PdfTextMarkupAnnotation setQuadPoints(PdfArray quadPoints)
PdfArray
of 8 × n numbers. Quadrilaterals are used to define a word or group of contiguous words in the text underlying the text markup annotation.
IMPORTANT NOTE: According to Table 179 in ISO 32000-1, the QuadPoints array lists the vertices in counterclockwise order and the text orientation is defined by the first and second vertex. This basically means QuadPoints is specified as lower-left, lower-right, top-right, top-left. HOWEVER, Adobe's interpretation (tested at least with Acrobat 10, Acrobat 11, Reader 11) is top-left, top-right, lower-left, lower-right (Z-shaped order). This means that if the QuadPoints array is specified according to the standard, the rendering is not as expected. Other viewers seem to follow Adobe's interpretation. Hence we recommend to use and expect QuadPoints array in Z-order, just as Acrobat and probably most other viewers expect.
setQuadPoints
in class PdfAnnotation
quadPoints
- an PdfArray
of 8 × n numbers specifying the coordinates of n quadrilaterals.
PdfTextMarkupAnnotation
instance.
Copyright © 1998–2018 iText Group NV. All rights reserved.