Class PdfTextMarkupAnnotation
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PdfNameSubtypesstatic final PdfNamestatic final PdfNamestatic final PdfNameFields inherited from class com.itextpdf.kernel.pdf.annot.PdfMarkupAnnotation
inReplyTo, popupFields inherited from class com.itextpdf.kernel.pdf.annot.PdfAnnotation
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 Summary
ConstructorsModifierConstructorDescriptionPdfTextMarkupAnnotation(Rectangle rect, PdfName subtype, float[] quadPoints) protectedPdfTextMarkupAnnotation(PdfDictionary pdfObject) Instantiates a newPdfTextMarkupAnnotationinstance based onPdfDictionaryinstance, that represents existing annotation object in the document. -
Method Summary
Modifier and TypeMethodDescriptionstatic PdfTextMarkupAnnotationcreateHighLight(Rectangle rect, float[] quadPoints) Creates a text markup annotation of highlight style subtype.static PdfTextMarkupAnnotationcreateSquiggly(Rectangle rect, float[] quadPoints) Creates a text markup annotation of squiggly-underline type.static PdfTextMarkupAnnotationcreateStrikeout(Rectangle rect, float[] quadPoints) Creates a text markup annotation of strikeout style subtype.static PdfTextMarkupAnnotationcreateUnderline(Rectangle rect, float[] quadPoints) Creates a text markup annotation of underline style subtype.An array of 8 × n numbers specifying the coordinates of n quadrilaterals in default user space.Gets aPdfNamewhich value is a subtype of this annotation.setQuadPoints(PdfArray quadPoints) Sets n quadrilaterals in default user space by passing anPdfArrayof 8 × n numbers.Methods inherited from class com.itextpdf.kernel.pdf.annot.PdfMarkupAnnotation
getCreationDate, getExternalData, getInReplyTo, getInReplyToObject, getIntent, getOpacity, getPopup, getPopupObject, getReplyType, getRichText, getSubject, getText, setCreationDate, setExternalData, setInReplyTo, setIntent, setOpacity, setPopup, setReplyType, setRichText, setSubject, setTextMethods inherited from class com.itextpdf.kernel.pdf.annot.PdfAnnotation
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, setTitleMethods inherited from class com.itextpdf.kernel.pdf.PdfObjectWrapper
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
-
Field Details
-
MarkupHighlight
Subtypes -
MarkupUnderline
-
MarkupStrikeout
-
MarkupSquiggly
-
-
Constructor Details
-
PdfTextMarkupAnnotation
-
PdfTextMarkupAnnotation
Instantiates a newPdfTextMarkupAnnotationinstance based onPdfDictionaryinstance, that represents existing annotation object in the document.- Parameters:
-
pdfObject- thePdfDictionaryrepresenting annotation object - See Also:
-
-
Method Details
-
createHighLight
Creates a text markup annotation of highlight style subtype.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.
- Parameters:
-
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. - Returns:
-
created
PdfTextMarkupAnnotationof Highlight type.
-
createUnderline
Creates a text markup annotation of underline style subtype.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.
- Parameters:
-
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. - Returns:
-
created
PdfTextMarkupAnnotationof Underline type.
-
createStrikeout
Creates a text markup annotation of strikeout style subtype.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.
- Parameters:
-
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. - Returns:
-
created
PdfTextMarkupAnnotationof Strikeout type.
-
createSquiggly
Creates a text markup annotation of squiggly-underline type.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.
- Parameters:
-
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. - Returns:
-
created
PdfTextMarkupAnnotationof squiggly-underline type.
-
getSubtype
Description copied from class:PdfAnnotationGets aPdfNamewhich value is a subtype of this annotation. See ISO-320001 12.5.6, "Annotation Types" for the reference to the possible types.- Specified by:
-
getSubtypein classPdfAnnotation - Returns:
- subtype of this annotation.
-
getQuadPoints
An array of 8 × n numbers specifying the coordinates of n quadrilaterals in default user space. 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.
- Returns:
-
an
PdfArrayof 8 × n numbers specifying the coordinates of n quadrilaterals.
-
setQuadPoints
Sets n quadrilaterals in default user space by passing anPdfArrayof 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.
- Parameters:
-
quadPoints- anPdfArrayof 8 × n numbers specifying the coordinates of n quadrilaterals. - Returns:
-
this
PdfTextMarkupAnnotationinstance.
-