Class PDFNet.MarkupAnnot
PDFNet.MarkupAnnot
Constructor Attributes | Constructor Name and Description |
---|---|
Markup is a base class for a number of annotations types that
are used to mark up PDF documents.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
PDFNet.MarkupAnnot.createFromAnnot(ann)
creates a markup annotation and initializes it using given annotation object.
|
<static> |
PDFNet.MarkupAnnot.createFromObj(d)
creates a markup annotation and initializes it using given Cos/SDF object.
|
Returns the inner bounding rectangle of the Markup annotation.
|
|
Returns the interior color of the annotation.
|
|
Returns the number indicating the interior color space of the annotation.
|
|
Returns the rectangle difference between overall annotation rectangle and content rectangle.
|
|
getPopup()
Returns the Popup object associated with this markup annotation.
|
|
Returns the subject of the Markup annotation.
|
|
getTitle()
Returns the title of the markup annotation.
|
|
setBorderEffect(effect)
Sets the border effect of the markup annotation.
|
|
setBorderEffectIntensity(intensity)
sets the border effect intensity of the markup annotation.
|
|
setContentRect(cr)
sets the inner bounding rectangle of the Markup annotation.
|
|
setCreationDates(dt)
Sets the creation date for the markup annotation.
|
|
setInteriorColor(c, CompNum)
Sets the interior color of the Markup annotation.
|
|
setInteriorColorRGB(col)
[Documentation Not Yet Added]
|
|
setOpacity(op)
Sets the opacity value for the annotation.
|
|
setPadding(rd)
sets the rectangle difference between overall annotation rectangle and content rectangle.
|
|
setPopup(ppup)
Sets the Popup object associated with this markup annotation.
|
|
setSubject(contents)
Sets subject of the Markup annotation.
|
|
setTitle(title)
sets the title of the markup annotation.
|
|
setTitleUString(title)
sets the title of the markup annotation.
|
Class Detail
PDFNet.MarkupAnnot(id)
Markup is a base class for a number of annotations types that
are used 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.
- A subset of markup annotations are intended to markup text of a
document (e.g. highlight, strikeout, jagged, underline) and they
are derived from TextMarkup base class.
- Parameters:
- id
Method Detail
<static>
{MarkupAnnot}
PDFNet.MarkupAnnot.createFromAnnot(ann)
creates a markup annotation and initializes it using given annotation object.
- Parameters:
- {Annot} ann
- Annot object used to initialize the Markup annotation.
- Returns:
- {MarkupAnnot} A promise that resolves to an object of type: "MarkupAnnot" (generated documentation)
<static>
{MarkupAnnot}
PDFNet.MarkupAnnot.createFromObj(d)
creates a markup annotation and initializes it using given Cos/SDF object.
- Parameters:
- {Obj} d
- The Cos/SDF object to initialze the annotation with.
- Returns:
- {MarkupAnnot} A promise that resolves to an object of type: "MarkupAnnot" (generated documentation)
{number}
getBorderEffect()
Return value enum:PDFNet.MarkupAnnot.BorderEffect = { e_None : 0 e_Cloudy : 1 }
- Returns:
- {number} A promise that resolves to the border effect of the markup annotation. Default value: e_None. Beginning with PDF 1.5, some annotations (square, circle, and polygon) may have a 'BE' entry, which is a border effect dictionary that specifies an effect that shall be applied to the border of the annotations. Beginning with PDF 1.6, the free text annotation may also have a BE entry.
{number}
getBorderEffectIntensity()
- Returns:
- {number} A promise that resolves to a number describing the intensity of the border effect, in the range 0 to 2. Beginning with PDF 1.5, some annotations (square, circle, and polygon) may have a 'BE' entry, which is a border effect dictionary that specifies an effect that shall be applied to the border of the annotations. Beginning with PDF 1.6, the free text annotation may also have a BE entry.
{rect}
getContentRect()
Returns the inner bounding rectangle of the Markup annotation.
- Returns:
- {rect} A promise that resolves to a rectangle specifying the region where content should be displayed.
{date}
getCreationDates()
- Returns:
- {date} A promise that resolves to the creation date for the markup annotation.
{colorpt}
getInteriorColor()
Returns the interior color of the annotation.
- Returns:
- {colorpt} A promise that resolves to a ColorPt object that denotes the color of the annotation.
{number}
getInteriorColorCompNum()
Returns the number indicating the interior color space of the annotation.
- Returns:
- {number} A promise that resolves to an integer indicating the number of channels forming the color space. 3 corresponds to RGB, 4 corresponds to CMYK, and 1 corresponds to Gray. If the interior is transparent, the return value is 0.
{number}
getOpacity()
- Returns:
- {number} A promise that resolves to the opacity value. Default value: 1.0.
{rect}
getPadding()
Returns the rectangle difference between overall annotation rectangle and content rectangle.
- Returns:
- {rect} A promise that resolves to a set of four numbers represented as a Rect struct.
- See:
- GetContentRect()
{Annot}
getPopup()
Returns the Popup object associated with this markup annotation.
- Returns:
- {Annot} A promise that resolves to a Popup object that is associated with this markup annotation.
{string}
getSubject()
Returns the subject of the Markup annotation.
(PDF 1.5)
- Returns:
- {string} A promise that resolves to a string representing the subject of the Markup annotation.
{string}
getTitle()
Returns the title of the markup annotation.
- Returns:
- {string} A promise that resolves to a string representing the title of the markup annotation, or null is the title is not specified.
setBorderEffect(effect)
Sets the border effect of the markup annotation. (Optional; PDF 1.5 )
Beginning with PDF 1.5, some annotations (square, circle, and polygon) may have a 'BE' entry,
which is a border effect dictionary that specifies an effect that shall be applied to the border
of the annotations. Beginning with PDF 1.6, the free text annotation may also have a BE entry.
- Parameters:
- {number} effect
- An entry from the enum "BorderEffect" that represents the border effect of the Markup annotation. Default value: e_None.
setBorderEffectIntensity(intensity)
sets the border effect intensity of the markup annotation.
(Optional; valid only if Border effect is Cloudy)
Beginning with PDF 1.5, some annotations (square, circle, and polygon) may have a 'BE' entry,
which is a border effect dictionary that specifies an effect that shall be applied to the border
of the annotations. Beginning with PDF 1.6, the free text annotation may also have a BE entry.
- Parameters:
- {number} intensity
- A number describing the intensity of the border effect, in the range 0 (which is default) to 2.
setContentRect(cr)
sets the inner bounding rectangle of the Markup annotation. (Optional)
- Parameters:
- {rect} cr
- A Rect struct to be assign to the 'RD' entry of the annotation dictionary.
setCreationDates(dt)
Sets the creation date for the markup annotation.
(Optional; PDF 1.5 )
- Parameters:
- {date} dt
- A Date object indicating the date the markup annotation is created.
setInteriorColor(c, CompNum)
Sets the interior color of the Markup annotation.
- Parameters:
- {colorpt} c
- A ColorPt object that denotes the color of the Markup annotation.
- {number} CompNum
- An integer indicating the number of channels forming the color space used. It also defines the length of the array to be allocated for storing the entries of c.
setInteriorColorRGB(col)
[Documentation Not Yet Added]
- Parameters:
- {colorpt} col
- (generated documentation)
setOpacity(op)
Sets the opacity value for the annotation.
(Optional; PDF 1.4 )
- Parameters:
- {number} op
- A number indicating the Markup annotation's opacity value. Default value: 1.0.
setPadding(rd)
sets the rectangle difference between overall annotation rectangle and content rectangle. (Optional)
- Parameters:
- {rect} rd
- A set of four numbers represented as a Rect struct
- See:
- GetContentRect()
setPopup(ppup)
Sets the Popup object associated with this markup annotation.
(Optional; PDF 1.3 )
- Parameters:
- {Annot} ppup
- A Popup object that is associated with this markup annotation.
setSubject(contents)
Sets subject of the Markup annotation.
(Optional; PDF 1.5 )
- Parameters:
- {string} contents
- A string representing the subject of the Markup annotation.
setTitle(title)
sets the title of the markup annotation.
(Optional; PDF 1.1)
- Parameters:
- {string} title
- A string.
setTitleUString(title)
sets the title of the markup annotation.
(Optional; PDF 1.1)
- Parameters:
- {string} title
- A string.