java.lang.Object | ||
↳ | com.pdftron.pdf.Annot | |
↳ | com.pdftron.pdf.annots.Markup |
Known Direct Subclasses
Caret,
Circle,
FileAttachment,
FreeText,
Ink,
Line,
Redaction,
RubberStamp,
Sound,
Square,
Text,
TextMarkup
|
Known Indirect Subclasses |
The meaning of an annotation's Contents entry varies by annotation type. Typically, it is the text that shall be displayed for the annotation or, if the annotation does not display text, an alternate description of the annotation's contents in human-readable form. In either case, the Contents entry is useful when extracting the document's contents in support of accessibility to users with disabilities or for other purposes. Many annotation types are defined as markup annotations because they are used primarily to mark up PDF documents. These annotations have text that appears as part of the annotation and may be displayed in other ways by a conforming reader, such as in a Comments pane. Markup annotations may be divided into the following groups: Free text annotations display text directly on the page. The annotation's Contents entry specifies the displayed text. Most other markup annotations have an associated pop-up window that may contain text. The annotation's Contents entry specifies the text that shall be displayed when the pop-up window is opened. These include text, line, square, circle, polygon, polyline, highlight,underline, squiggly-underline, strikeout, rubber stamp, caret, ink, and file attachment annotations. Sound annotations do not have a pop-up window but may also have associated text specified by the Contents entry. When separating text into paragraphs, a CARRIAGE RETURN (0Dh) shall be used and not, for example, a LINE FEED character (0Ah). NOTE 1 A subset of markup annotations is called text markup annotations. The remaining annotation types are not considered markup annotations: The pop-up annotation type shall not appear by itself; it shall be associated with a markup annotation that uses it to display text. NOTE 2If an annotation has no parent, the Contents entry shall represent the text of the annotation, otherwise it shall be ignored by a conforming reader. For all other annotation types (Link, Movie, Widget, PrinterMark, and TrapNet), the Contents entry shall provide an alternate representation of the annotation's contents in human-readable form, which is useful when extracting the document's contents in support of accessibility to users with disabilities or for other purposes.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | e_Cloudy | The Constant e_Cloudy. | |||||||||
int | e_None | This integer list represents the Border Effect of the Markup annotation e_None - No effect e_Cloudy - The border should appear "cloudy". |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.pdftron.pdf.Annot
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Markup(Obj d)
Creates a Markup annotation and initialize it using given Cos/SDF object.
| |||||||||||
Markup()
Creates an empty Markup annotation.
| |||||||||||
Markup(Annot annot)
Creates a Markup annotation and initialize it using given annotation object.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int |
getBorderEffect()
Gets the Border Effect of the Markup Annotation.
| ||||||||||
double |
getBorderEffectIntensity()
Gets the Border Effect Intensity of the Markup Annotation.
| ||||||||||
Rect |
getContentRect()
Gets the inner bounding rectangle of the Square.
| ||||||||||
Date |
getCreationDates()
Gets the creation date of the Markup Annotation.
| ||||||||||
ColorPt |
getInteriorColor()
Gets the interior color of the Square.
| ||||||||||
int |
getInteriorColorCompNum()
Gets the number indicating interior color space of the Square.
| ||||||||||
double |
getOpacity()
Gets the contant opacity value corresponding to the annotation.
| ||||||||||
Rect |
getPadding()
Gets the rectangle difference of the Square.
| ||||||||||
Popup |
getPopup()
Gets the Popup object associated with this Markup annotation.
| ||||||||||
String |
getSubject()
Gets subject of the Markup Annotation.
| ||||||||||
String |
getTitle()
Gets the title of the Markup Annotation.
| ||||||||||
void |
rotateAppearance(double angle)
Rotates the appearance of the Markup Annotation.
| ||||||||||
void |
setBorderEffect(int effect)
Sets the Border Effect of the Markup Annotation.
| ||||||||||
void |
setBorderEffectIntensity(double intensity)
Sets the Border Effect Intensity of the Markup Annotation.
| ||||||||||
void |
setContentRect(Rect cr)
Sets the inner bounding rectangle of the Square.
| ||||||||||
void |
setCreationDates(Date date)
Sets the creation date of the Markup Annotation.
| ||||||||||
void |
setInteriorColor(ColorPt cpt, int comp_num)
Sets the interior color of the Square.
| ||||||||||
void |
setOpacity(double opacity)
Sets the contant opacity value corresponding to the annotation.
| ||||||||||
void |
setPadding(double padding)
Sets the rectangle difference of the Square.
| ||||||||||
void |
setPadding(Rect rd)
Sets the rectangle difference of the Square.
| ||||||||||
void |
setPopup(Popup popup)
Sets the Popup object associated with this Markup annotation.
| ||||||||||
void |
setSubject(String title)
Sets subject of the Markup Annotation.
| ||||||||||
void |
setTitle(String title)
Sets the title of the Markup Annotation.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.pdftron.pdf.Annot
| |||||||||||
From class
java.lang.Object
|
The Constant e_Cloudy.
This integer list represents the Border Effect of the Markup annotation e_None - No effect e_Cloudy - The border should appear "cloudy". The width and dash array specified by Border Style shall be honored.
Creates a Markup annotation and initialize it using given Cos/SDF object.
Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.
d | the input Cos/SDF object |
---|
Creates an empty Markup annotation.
Creates a Markup annotation and initialize it using given annotation object.
Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.
annot | the annot |
---|
PDFNetException |
---|
Gets the Border Effect of the Markup Annotation.
Note: The BorderEffect value is an entry in the "BorderEffect" enum, representing the border effect to apply. Possible values are: e_None - No effect: the border shall be as described by the annotation dictionary's BorderStyle(BS) entry. e_Cloudy - The border should appear "cloudy". The width and dash array specified by BS shall be honored. Default value: e_None.
PDFNetException |
---|
Gets the Border Effect Intensity of the Markup Annotation.
Note: The BorderEffectIntensity value is a number describing the intensity of the effect, in the range 0 to 2. Default value: 0.
PDFNetException |
---|
Gets the inner bounding rectangle of the Square. (Optional; PDF 1.5)
PDFNetException |
---|
Gets the creation date of the Markup Annotation.
Note: The Date object not only includes date, it actually includes both date and time when the annotation was created.
This corresponds to the 'CreationDate' field of the markup annotation's dictionary.
PDFNetException |
---|
Gets the interior color of the Square.
Note: that the color can be in different color spaces: Gray, RGB, or CMYK. Call "GetInteriorColorCompNum" to access the color space information corresponding to the interioir color.
PDFNetException |
---|
Gets the number indicating interior color space of the Square.
PDFNetException |
---|
Gets the contant opacity value corresponding to the annotation.
Note: The constant opacity value shall be used in painting the annotation. This value shall apply to all visible elements of the annotation in its closed state (including its background and border) but not to the pop-up window that appears when the annotation is opened. The specified value shall not used if the annotation has an appearance stream in that case, the appearance stream shall specify any transparency. (However, if the compliant viewer regenerates the annotation's appearance stream, it may incorporate the CA value into the stream's content.) The implicit blend mode is Normal. Default value: 1.0. If no explicit appearance stream is defined for the annotation, it may bepainted by implementation-dependent means that do not necessarily conform to the PDF imaging model; in this case, the effect of this entry is implementation-dependent as well.
PDFNetException |
---|
Gets the rectangle difference of the Square. (Optional; PDF 1.5)
Note: rectangle difference is A set of four numbers that shall describe the numerical differences between two rectangles: the Rect entry of the annotation and the actual boundaries of the underlying square or Square. Such a difference may occur in situations where a border effect (described by BE) causes the size of the Rect to increase beyond that of the square or Square. The four numbers shall correspond to the differences in default user space between the left, top, right, and bottom coordinates of Rect and those of the square or Square, respectively. Each value shall be greater than or equal to 0. The sum of the top and bottom differences shall be less than the height of Rect, and the sum of the left and right differences shall be less than the width of Rect.
PDFNetException |
---|
Gets the Popup object associated with this Markup annotation.
Note: The Popup is An indirect reference to a pop-up annotation for entering or editing the text associated with this annotation.
PDFNetException |
---|
Gets subject of the Markup Annotation.
Note: The subject is The Text representing a short description of the subject being addressed by the annotation.
PDFNetException |
---|
Gets the title of the Markup Annotation.
Note: The title is The text label that shall be displayed in the title bar of the annotation's pop-up window when open and active. This entry shall identify the user who added the annotation.
PDFNetException |
---|
Rotates the appearance of the Markup Annotation.
Note: Apply a rotation to an existing appearance. This rotation will be reflected in the bounding rect of the annot (which will be updated), but not in any other part of the annotation dictionary. This will effectively create a custom appearance for the annotation, and any subsequent calls to `RefreshAppearance` will clear this transformation.
angle | the new rotation. |
---|
PDFNetException |
---|
Sets the Border Effect of the Markup Annotation. (Optional; PDF 1.5 )
Note: The BorderEffect value is an entry in the "BorderEffect" enum, representing the border effect to apply. Possible values are: e_None - No effect: the border shall be as described by the annotation dictionary's BorderStyle(BS) entry. e_Cloudy - The border should appear "cloudy". The width and dash array specified by BS shall be honored. Default value: e_None.
effect | An entry from the enum "BorderEffect" that represents the border effect. |
---|
PDFNetException |
---|
Sets the Border Effect Intensity of the Markup Annotation. (Optional; valid only if Border effect is Cloudy)
Note: The BorderEffectIntensity value is a number describing the intensity of the effect, in the range 0 to 2. Default value: 0.
intensity | A number representing the border effect. |
---|
PDFNetException |
---|
Sets the inner bounding rectangle of the Square. (Optional; PDF 1.5)
cr | the new content rect |
---|
PDFNetException |
---|
Sets the creation date of the Markup Annotation. (Optional; PDF 1.5 )
Note: The Date object not only includes date, it actually includes both date and time when the annotation was created.
This corresponds to the 'CreationDate' field of the markup annotation's dictionary.
date | the new creation dates |
---|
PDFNetException |
---|
Sets the interior color of the Square. (Optional; PDF 1.4 )
Note: it is necessary to make sure the consistancy between the ColorPt type and the ColorSpace::Type value. e_device_gray corresponds to an array of two numbers; e_device_rgb corresponds to an array of 3 numbers, e_device_cmyk corresponds to an array of 4 numnbers, while e_null correspons to an arry of 0 number. Entries out of the specified color space array length will be desgarded. However, missing entries for a specified color space will throw exception either when setting the color or when later retrieving color(colorspace) information.
cpt | the cpt |
---|---|
comp_num | the comp_num |
PDFNetException |
---|
Sets the contant opacity value corresponding to the annotation. (Optional; PDF 1.4 )
Note: The constant opacity value shall be used in painting the annotation. This value shall apply to all visible elements of the annotation in its closed state (including its background and border) but not to the pop-up window that appears when the annotation is opened. The specified value shall not used if the annotation has an appearance stream in that case, the appearance stream shall specify any transparency. (However, if the compliant viewer regenerates the annotation's appearance stream, it may incorporate the CA value into the stream's content.) The implicit blend mode is Normal. Default value: 1.0. If no explicit appearance stream is defined for the annotation, it may bepainted by implementation-dependent means that do not necessarily conform to the PDF imaging model; in this case, the effect of this entry is implementation-dependent as well.
opacity | the new opacity |
---|
PDFNetException |
---|
Sets the rectangle difference of the Square. (Optional; PDF 1.5)
padding | a number specifying the padding to be applied on each side. |
---|
PDFNetException |
---|
Sets the rectangle difference of the Square. (Optional; PDF 1.5)
Note: rectangle difference is A set of four numbers that shall describe the numerical differences between two rectangles: the Rect entry of the annotation and the actual boundaries of the underlying square or Square. Such a difference may occur in situations where a border effect (described by BE) causes the size of the Rect to increase beyond that of the square or Square. The four numbers shall correspond to the differences in default user space between the left, top, right, and bottom coordinates of Rect and those of the square or Square, respectively. Each value shall be greater than or equal to 0. The sum of the top and bottom differences shall be less than the height of Rect, and the sum of the left and right differences shall be less than the width of Rect.
rd | A set of four numbers(represented as a Rect object) specifying the difference on the four different directions. |
---|
PDFNetException |
---|
Sets the Popup object associated with this Markup annotation. (Optional; PDF 1.3 )
Note: the Popup is An indirect reference to a pop-up annotation for entering or editing the text associated with this annotation.
popup | the new popup |
---|
PDFNetException |
---|
Sets subject of the Markup Annotation. (Optional; PDF 1.5 )
Note: The subject is The Text representing a short description of the subject being addressed by the annotation.
title | the new subject |
---|
PDFNetException |
---|
Sets the title of the Markup Annotation. (Optional; PDF 1.1)
Note: The title is The text label that shall be displayed in the title bar of the annotation's pop-up window when open and active. This entry shall identify the user who added the annotation.
title | A string representing the title of the Markup Annotation |
---|
PDFNetException |
---|