Comprehensive Guide for Developers: Features, Integration, and API Reference
Represents an annotation in a PDF document. More...
#include <pdfsdk/cxx/annot.h>
Public Member Functions | |
Object | GetPdfObject () const |
Get the PDF object associated with this annotation. | |
bool | Equals (const Annot &that) const |
Check if this annotation is equal to another annotation. | |
PDAtom | GetSubtype () const |
Get the subtype of this annotation. | |
void | SetFlags (PDAnnotFlags flags) |
Set the flags of this annotation. | |
PDAnnotFlags | GetFlags () const |
Get the flags of this annotation. | |
void | SetRect (const PDF::RectF &rect) |
Set the rectangle of this annotation. | |
PDF::RectF | GetRect () const |
Get the rectangle of this annotation. | |
void | SetColor (PDColorValue color) |
Set the color of this annotation. | |
PDColorValue | GetColor () const |
Get the color of this annotation. | |
void | SetContents (const std::wstring &contents) |
Set the contents of this annotation. | |
std::wstring | GetContents () const |
Get the contents of this annotation. | |
void | SetModDate (const PDDateTime &date) |
Set the modification date of this annotation. | |
PDDateTime | GetModDate () const |
Get the latest modification date of this annotation. | |
void | SetBorder (const PDAnnotBorder &border) |
Sets the border for an annotation. | |
PDAnnotBorder | GetBorder () const |
Get the border of this annotation. | |
void | SetOCMD (OCMembership ocmd) |
Set the optional content (OC) membership dictionary for this annotation. | |
OCMembership | GetOCMD () const |
Get the optional content (OC) membership dictionary of this annotation. | |
bool | IsVisibleInConfig (OCConfig config) const |
Check if an annotation is visible in a given optional content (OC) configuration. | |
void | SetAppearanceState (PDAtom appState) |
Set the appearance state for an annotation. | |
PDAtom | GetAppearanceState () const |
Get the appearance state of this annotation. | |
void | SetFillOpacity (float opacity) |
Set the fill opacity of an annotation. | |
float | GetFillOpacity () const |
Get the fill opacity of an annotation. | |
void | SetStrokeOpacity (float opacity) |
Set the stroke opacity of this annotation. | |
float | GetStrokeOpacity () const |
Get the stroke opacity of this annotation. | |
bool | HasAppearance (PDAnnotState state, PDAtom appState) const |
Check if an annotation has an appearance state defined for one of the three states (Normal, Rollover, Down). | |
std::wstring | GetName () const |
Get the name for an annotation. | |
void | SetName (const std::wstring &name) |
Set the name for an annotation. | |
bool | IsVisible () const |
Check if this annotation is visible. | |
void | SetVisible (bool visible) |
Set the visibility of this annotation. | |
PDEBlendMode | GetBlendMode () const |
Get the blend mode of this annotation. | |
void | SetBlendMode (PDEBlendMode blendMode) |
Set the blend mode of this annotation. | |
void | SetAppearance (PDAnnotState state, PDAtom appState, XObject app) |
Set the appearance for an annotation for the given state and appearance state. | |
XObject | GetAppearance (PDAnnotState state, PDAtom appState) const |
Get the appearance graphics object (XObject) of this annotation for the given state and appearance state. | |
void | SetLinkActions (const Action &actions) |
Set the link actions of this annotation. | |
Action | GetLinkActions () const |
Get the link actions associated with this annotation. | |
void | RemoveLinkActions () |
Remove all link actions associated with this annotation. | |
void | SetLinkQuadPoints (const QuadPoints &quadpoints) |
Set the link quad points of this annotation. | |
QuadPoints | GetLinkQuadPoints () const |
Get the link quad points of this annotation. | |
void | SetLinkBorderStyle (const PDAnnotBorderStyle &borderStyle) |
Set the border style for a link annotation. | |
PDAnnotBorderStyle | GetLinkBorderStyle () const |
Get the link border style of this annotation. | |
void | SetLinkDest (const Dest &dest) |
Set the link destination of this annotation. | |
Dest | GetLinkDest () const |
Get the link destination of this annotation. | |
bool | IsMarkupAnnot () const |
Check if this annotation is a markup annotation. | |
void | SetMarkupTitle (const std::wstring &title) |
Set the title of the markup annotation. | |
std::wstring | GetMarkupTitle () const |
Get the title of the markup annotation. | |
Annot | GetMarkupPopup () const |
Get the popup annotation associated with the markup annotation. | |
void | SetMarkupRichContents (const std::wstring &contents) |
Set the rich contents of a markup annotation. | |
std::wstring | GetMarkupRichContents () const |
Get the rich contents of a markup annotation. | |
void | SetMarkupCreationDate (const PDDateTime &date) |
Set the creation date of the markup annotation. | |
PDDateTime | GetMarkupCreationDate () const |
Get the creation date of the markup annotation. | |
void | SetMarkupSubject (const std::wstring &subject) |
Set the subject of the markup annotation. | |
std::wstring | GetMarkupSubject () const |
Get the subject of the markup annotation. | |
void | SetMarkupInReplyTo (const Annot &inReplyTo) |
Set the in reply to (IRT) for a markup annotation. | |
Annot | GetMarkupInReplyTo () const |
Get the annotation that this markup annotation is in reply to. | |
void | SetMarkupReplyType (PDMarkupAnnotReplyType replyType) |
Set the reply type for a markup annotation. | |
PDMarkupAnnotReplyType | GetMarkupReplyType () const |
Get the reply type of the markup annotation. | |
void | SetMarkupIntent (PDAtom intent) |
Set the intent of the markup annotation. | |
PDAtom | GetMarkupIntent () const |
Get the intent of the markup annotation. | |
void | SetTextOpen (bool open) |
Set the open state of the text or popup annotation (having a parent markup annotation). | |
bool | IsTextOpen () const |
Check if the text or popup annotation is set to be shown. | |
void | SetTextMarkupQuadPoints (const QuadPoints &quads) |
Set the quad points of the text markup annotation. | |
QuadPoints | GetTextMarkupQuadPoints () const |
Get the quad points of the text markup annotation. | |
std::vector< std::vector< PointF > > | GetInkPointsList () const |
Get the list of ink points of the ink annotation. | |
void | SetInkPointsList (const std::vector< std::vector< PointF > > &pointslist) |
Set the list of ink points of the ink annotation. | |
PDRotate | GetWidgetRotate () const |
Get the rotation angle of the widget annotation. | |
void | SetWidgetRotate (PDRotate rotate) |
Set the rotation angle of the widget annotation. | |
PDAnnotBorderStyle | GetWidgetBorderStyle () const |
Get the border style of the widget annotation. | |
void | SetWidgetBorderStyle (PDAnnotBorderStyle borderStyle) |
Set the border style of the widget annotation. | |
PDColorValue | GetWidgetBorderColor () const |
Get the border color of the widget annotation. | |
void | SetWidgetBorderColor (PDColorValue color) |
Set the border color of the widget annotation. | |
PDColorValue | GetWidgetBackgroundColor () const |
Get the background color of the widget annotation. | |
void | SetWidgetBackgroundColor (PDColorValue color) |
Set the background color of the widget annotation. | |
PDFontInfo | GetWidgetFontInfo () const |
Get the font information of the widget annotation. | |
void | SetWidgetFontInfo (const PDFontInfo &fontInfo) |
Set the font information of the widget annotation. | |
float | GetWidgetFontSize () const |
Get the font size of the widget annotation. | |
void | SetWidgetFontSize (float fontSize) |
Set the font size of the widget annotation. | |
PDColorValue | GetWidgetFontColor () const |
Get the font color of the widget annotation. | |
void | SetWidgetFontColor (PDColorValue color) |
Set the font color of the widget annotation. | |
FormField | GetWidgetParent () const |
Get the parent form field of the widget annotation. | |
PDRotate | GetFreeTextRotate () const |
Get the rotation angle of the free text annotation. | |
void | SetFreeTextRotate (PDRotate rotate) |
Set the rotation angle of the free text annotation. | |
PDQuadding | GetFreeTextQuadding () const |
Get the text alignment of the free text annotation. | |
void | SetFreeTextQuadding (PDQuadding quadding) |
Set the text alignment of the free text annotation. | |
PDAnnotBorderStyle | GetFreeTextBorderStyle () const |
Get the border style of the free text annotation. | |
void | SetFreeTextBorderStyle (const PDAnnotBorderStyle &borderStyle) |
Set the border style of the free text annotation. | |
PDAnnotBorderEffect | GetFreeTextBorderEffect () const |
Get the border effect of the free text annotation. | |
void | SetFreeTextBorderEffect (const PDAnnotBorderEffect &borderEffect) |
Set the border effect of the free text annotation. | |
PDFontInfo | GetFreeTextFontInfo () const |
Get the font information of the free text annotation. | |
void | SetFreeTextFontInfo (const PDFontInfo &fontInfo) |
Set the font information of the free text annotation. | |
PDColorValue | GetFreeTextFontColor () const |
Get the font color of the free text annotation. | |
void | SetFreeTextFontColor (PDColorValue fontColor) |
Set the font color of the free text annotation. | |
PDColorValue | GetFreeTextBorderColor () const |
Get the border color of the free text annotation. | |
void | SetFreeTextBorderColor (PDColorValue borderColor) |
Set the border color of the free text annotation. | |
float | GetFreeTextFontSize () const |
Get the font size of the free text annotation. | |
void | SetFreeTextFontSize (float fontSize) |
Set the font size of the free text annotation. | |
PDAtom | GetFreeTextLineEnding () const |
Get the callout line ending style of the free text annotation. | |
void | SetFreeTextLineEnding (PDAtom endPointStyle) |
Set the line ending style of the free text annotation. | |
RectF | GetFreeTextRectDifferences () const |
Get the differences in rectangle coordinates between the annotation rectangle and text rectangle within. | |
void | SetFreeTextRectDifferences (const RectF &differences) |
Set the differences in rectangle coordinates between the annotation rectangle and text rectangle within. | |
size_t | HitTestFreeTextChar (const PointF &pagePt) const |
Perform a hit test to determine which character in the free text annotation is at the specified point. | |
Quad | GetFreeTextCharQuad (size_t index) const |
Get the quad representing the bounding box of the character at the specified index in the free text annotation. | |
size_t | GetFreeTextNumLines () const |
Get the number of lines contained in the free text annotation. | |
float | GetFreeTextLineSpacing () const |
Get the line spacing of the free text annotation. | |
void | SetFreeTextLineSpacing (float lineSpacing) |
Set the line spacing of the free text annotation. | |
float | GetFreeTextCharSpacing () const |
Get the character spacing for the free text annotation. | |
void | SetFreeTextCharSpacing (float charSpacing) |
Set the character spacing of the free text annotation. | |
size_t | GetFreeTextFirstCharOnLine (size_t lineIndex) const |
Get the index of the first character on the specified line in the free text annotation. | |
size_t | GetFreeTextLineWithChar (size_t charIndex) const |
Get the index of the line containing the specified character for a free text annotation. | |
Annot (PDAnnot handle, bool adopt=false) noexcept | |
Annot (const Annot &rhs) noexcept | |
Annot & | operator= (const Annot &rhs) noexcept |
Annot (Annot &&rhs) noexcept | |
Annot & | operator= (Annot &&rhs) noexcept |
Represents an annotation in a PDF document.
ISO 32000-2:2020 - 12.5 Annotations
bool PDF::Annot::Equals | ( | const Annot & | that | ) | const |
Check if this annotation is equal to another annotation.
[in] | that | A reference to the other annotation to compare to. |
XObject PDF::Annot::GetAppearance | ( | PDAnnotState | state, |
PDAtom | appState ) const |
Get the appearance graphics object (XObject) of this annotation for the given state and appearance state.
An additional appearance state (PDAtom appState) can be specified as an alternative to a simple border and color specification. This is achieved by the use of an appearance stream (app XObject), rendered inside the annotation's rectangle. There are normal, rollover, and down appearances (PDAnnotState state) defined in the appearance dictionary. For example when check box is hovered over (PDAnnotState state = hover), it can look different depending on whether it is checked (PDAtom appState = On) or unchecked (PDAtom appState = Off) For more information refer to section 12.5.2 Annotation dictionaries, Table 166 — Entries common to all annotation dictionaries, keys AP and AS and section 12.5.5 Appearance streams Table 170 — Entries in an appearance dictionary, also see the example below the table for the appearance dictionary representation. from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | state | The state to get the (XObject) for. One of Normal, Rollover, Down. |
[in] | appState | The appearance state to get the (XObject) for. (i.e. "On" or "Off" for a checkbox) |
PDAtom PDF::Annot::GetAppearanceState | ( | ) | const |
Get the appearance state of this annotation.
Retrieve the additional appearance state (PDAtom appState), if specified, as an alternative to a simple border and color specification. This is achieved by the use of an appearance stream (form XObject), rendered inside the annotation's rectangle. There are normal, rollover, and down appearances (PDAnnotState state) defined in the appearance dictionary. For example when check box is hovered over (PDAnnotState state = hover), it can look different depending on whether it is checked (PDAtom appState = On) or unchecked (PDAtom appState = Off) For more information refer to section 12.5.2 Annotation dictionaries, Table 166 — Entries common to all annotation dictionaries, keys AP and AS and section 12.5.5 Appearance streams Table 170 — Entries in an appearance dictionary, also see the example below the table for the appearance dictionary representation. from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
PDEBlendMode PDF::Annot::GetBlendMode | ( | ) | const |
Get the blend mode of this annotation.
For more information on refer to sections 11.3.5 Blend mode and 12.5.2 Annotation dictionaries, Table 166 — Entries common to all annotation dictionaries, key BM, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
PDAnnotBorder PDF::Annot::GetBorder | ( | ) | const |
Get the border of this annotation.
A square annotation border is defined by its width, the radii of its horizontal and vertical corners and a dash pattern if the border shall be defined as dashed. For more information refer to section 12.5.2 Annotation dictionaries, Table 166 — Entries common to all annotation dictionaries, key Border, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
PDColorValue PDF::Annot::GetColor | ( | ) | const |
Get the color of this annotation.
std::wstring PDF::Annot::GetContents | ( | ) | const |
Get the contents of this annotation.
The text that shall be displayed for the annotation or, if this type of annotation does not display text, an alternative description of the annotation’s contents in human-readable form. For more information refer to section 12.5.2 Annotation dictionaries, Table 166 — Entries common to all annotation dictionaries, key Contents, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
float PDF::Annot::GetFillOpacity | ( | ) | const |
Get the fill opacity of an annotation.
This is the transparency of the interior of an annotation's shape. For more information refer to section 12.5.2 Annotation dictionaries, Table 166 — Entries common to all annotation dictionaries, key 'ca' from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
PDAnnotFlags PDF::Annot::GetFlags | ( | ) | const |
Get the flags of this annotation.
Annotation flags specify various behavior characteristics of an annotation. There are ten possible flags that can be set. They influence whether for example an annotation is printed when the document is printed, whether the annotation is shown enlarged when the page is magnified etc. For more information refer to section 12.5.3 Annotation flags, Table 167 - Annotation flags from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
PDColorValue PDF::Annot::GetFreeTextBorderColor | ( | ) | const |
Get the border color of the free text annotation.
This information is stored inside the Appearance Characteristics Dictionary (MK). Its BC entry holds information regarding the border color.
PDAnnotBorderEffect PDF::Annot::GetFreeTextBorderEffect | ( | ) | const |
Get the border effect of the free text annotation.
The border style specifies the line width and dash pattern that shall be used in drawing the annotation’s border. For more information refer to 12.5.6.6 Free text annotations, Table 177 — Additional entries specific to a free text annotation, key BS and section 12.5.4 Border styles, Table 168 — Entries in a border style dictionary, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
PDAnnotBorderStyle PDF::Annot::GetFreeTextBorderStyle | ( | ) | const |
Get the border style of the free text annotation.
The border style specifies the line width and dash pattern that shall be used in drawing the annotation’s border. For more information refer to sections 12.5.6.6 Free text annotations, Table 177 — Additional entries specific to a free text annotation, key BS, and section 12.5.4 Border styles, Table 168 — Entries in a border style dictionary from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
Quad PDF::Annot::GetFreeTextCharQuad | ( | size_t | index | ) | const |
Get the quad representing the bounding box of the character at the specified index in the free text annotation.
For a visual representation of the bounding box for a character (glyph) refer to section 9.2.4 Glyph positioning and metrics Figure 54 — Glyph metrics from the ISO 32000-2:2020 (PDF 2.0) PDF Standard. The four corners of the glyph bounding box are referred to here as the Quad.
[in] | index | The index of the character. |
float PDF::Annot::GetFreeTextCharSpacing | ( | ) | const |
Get the character spacing for the free text annotation.
For more information refer to section 9.3.2 Character spacing from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
size_t PDF::Annot::GetFreeTextFirstCharOnLine | ( | size_t | lineIndex | ) | const |
Get the index of the first character on the specified line in the free text annotation.
[in] | lineIndex | The index of the line. |
PDColorValue PDF::Annot::GetFreeTextFontColor | ( | ) | const |
Get the font color of the free text annotation.
This information is contained within the default appearance (DA) string within its annotation dictionary. For more information refer to 12.5.6.6 Free text annotations, Table 177 — Additional entries specific to a free text annotation, key DA, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
PDFontInfo PDF::Annot::GetFreeTextFontInfo | ( | ) | const |
Get the font information of the free text annotation.
This includes the font family, format and style (regular/italic/bold/bolditalic).
float PDF::Annot::GetFreeTextFontSize | ( | ) | const |
Get the font size of the free text annotation.
This information is contained within the default appearance (DA) string within its annotation dictionary. For more information refer to 12.5.6.6 Free text annotations, Table 177 — Additional entries specific to a free text annotation, key DA, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
PDAtom PDF::Annot::GetFreeTextLineEnding | ( | ) | const |
Get the callout line ending style of the free text annotation.
A name specifying the line ending style that shall be used when drawing a callout line (i.e. OpenArrow ->) For more information refer to section 12.5.6.6 Free text annotations, Table 177 — Additional entries specific to a free text annotation, key LE. The line ending names are described in section 12.5.6.7 Line annotations Table 179 — Line ending styles from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
float PDF::Annot::GetFreeTextLineSpacing | ( | ) | const |
Get the line spacing of the free text annotation.
size_t PDF::Annot::GetFreeTextLineWithChar | ( | size_t | charIndex | ) | const |
Get the index of the line containing the specified character for a free text annotation.
[in] | charIndex | The index of the character. |
size_t PDF::Annot::GetFreeTextNumLines | ( | ) | const |
Get the number of lines contained in the free text annotation.
PDQuadding PDF::Annot::GetFreeTextQuadding | ( | ) | const |
Get the text alignment of the free text annotation.
The text can be left-justified, centered or right-justified. For more information refer to section 12.5.6.6 Free text annotations, Table 177 — Additional entries specific to a free text annotation, key Q, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
RectF PDF::Annot::GetFreeTextRectDifferences | ( | ) | const |
Get the differences in rectangle coordinates between the annotation rectangle and text rectangle within.
A set of four numbers describing the numerical differences between two rectangles - the Rect entry from the free text annotation dictionary (defining the location of the annotation on the page) and the inner rectangle where the annotation’s text should be displayed. For more information refer to section 12.5.6.6 Free text annotations, Table 177 — Additional entries specific to a free text annotation, key RD, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
PDRotate PDF::Annot::GetFreeTextRotate | ( | ) | const |
Get the rotation angle of the free text annotation.
This information is found in the appearance characteristics dictionary of the free text annotation. For more information refer to section 12.5.6.6 Free text annotations from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
std::vector< std::vector< PointF > > PDF::Annot::GetInkPointsList | ( | ) | const |
Get the list of ink points of the ink annotation.
The ink points, when connected by a stroke (a path) represents the freehand signature or note created by a user. InkList is an 2D array of points, where each sub-array (vector) represents a stroke made by the user. Each point is defined by its X and Y coordinates in floating-point representation. For more information refer to section 12.5.6.13 Ink annotations, and Table 185 — Additional entries specific to an ink annotation, key InkList from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
Action PDF::Annot::GetLinkActions | ( | ) | const |
Get the link actions associated with this annotation.
An action allows for a wide range of interactive behaviour like navigating to a different page, opening a web page, executing a JavaScript function, or performing other tasks. For more information refer to section 12.6 Actions from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
PDAnnotBorderStyle PDF::Annot::GetLinkBorderStyle | ( | ) | const |
Get the link border style of this annotation.
Retrieve the visual style of the borders around an annotation like the line width, type (solid/dashed/bevelled/inset/ underline) and dash appearance (if dashed). For more information refer to section 12.5.6.5 Link annotations, Table 176 — Additional entries specific to a link annotations, key BS.
Dest PDF::Annot::GetLinkDest | ( | ) | const |
Get the link destination of this annotation.
A destination that shall be displayed when the annotation is activated.
QuadPoints PDF::Annot::GetLinkQuadPoints | ( | ) | const |
Get the link quad points of this annotation.
Quad points comprise the region in which the link should be activated. For more information refer to section 12.5.6.5 Link annotations Table 176 — Additional entries specific to a link annotation, key QuadPoints, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
PDDateTime PDF::Annot::GetMarkupCreationDate | ( | ) | const |
Get the creation date of the markup annotation.
For more information refer to section 12.5.6.2 Markup annotations, Table 172 — Additional entries in an annotation dictionary specific to markup annotations, key CreationDate, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
Annot PDF::Annot::GetMarkupInReplyTo | ( | ) | const |
Get the annotation that this markup annotation is in reply to.
PDAtom PDF::Annot::GetMarkupIntent | ( | ) | const |
Get the intent of the markup annotation.
A name describing the intent of the markup annotation. Intents allow interactive PDF processors to distinguish between different uses and behaviours of a single markup annotation type. 12.5.6.2 Markup annotations, Table 172 — Additional entries in an annotation dictionary specific to markup annotations, key IT, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
Annot PDF::Annot::GetMarkupPopup | ( | ) | const |
Get the popup annotation associated with the markup annotation.
For more information refer to section 12.5.6.2 Markup annotations, Table 172 — Additional entries in an annotation dictionary specific to markup annotations, key Popup, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
PDMarkupAnnotReplyType PDF::Annot::GetMarkupReplyType | ( | ) | const |
Get the reply type of the markup annotation.
The reply type determines whether users can reply directly to a specific annotation or comment, or are able group multiple annotations or comments together. For more information refer to section 12.5.6.2 Markup annotations, Table 172 — Additional entries in an annotation dictionary specific to markup annotations, key RT, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
std::wstring PDF::Annot::GetMarkupRichContents | ( | ) | const |
Get the rich contents of a markup annotation.
For more information refer to section 12.5.6.2 Markup annotations, Table 172 — Additional entries in an annotation dictionary specific to markup annotations, key RC, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
std::wstring PDF::Annot::GetMarkupSubject | ( | ) | const |
Get the subject of the markup annotation.
For more information refer to section 12.5.6.2 Markup annotations, Table 172 — Additional entries in an annotation dictionary specific to markup annotations, key Subj, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
std::wstring PDF::Annot::GetMarkupTitle | ( | ) | const |
Get the title of the markup annotation.
For more information refer to section 12.5.6.2 Markup annotations, Table 172 — Additional entries in an annotation dictionary specific to markup annotations, key T, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
PDDateTime PDF::Annot::GetModDate | ( | ) | const |
Get the latest modification date of this annotation.
For more information refer to section 12.5.2 Annotation dictionaries, Table 166 — Entries common to all annotation dictionaries key M, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
std::wstring PDF::Annot::GetName | ( | ) | const |
Get the name for an annotation.
OCMembership PDF::Annot::GetOCMD | ( | ) | const |
Get the optional content (OC) membership dictionary of this annotation.
For more information refer to section 8.11.2.2 Optional content membership dictionaries, and section 12.5.2 Annotation dictionaries Table 166 — Entries common to all annotation dictionaries, key OC, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
Object PDF::Annot::GetPdfObject | ( | ) | const |
Get the PDF object associated with this annotation.
PDF::RectF PDF::Annot::GetRect | ( | ) | const |
Get the rectangle of this annotation.
This represents the Rect entry of an Annotation dictionary. It defins the location of the annotation on the page in default user space units. The rectangle is defined by its lower-left (x1, y1) and upper-right (x2, y2) points (i.e. [x1, y1, x2, y2]) in reference to the origin - the lower-left corner of the page (0, 0). For more information refer to section 12.5.2 Annotation dictionaries, Table 166 - Entries common to all annotation dictionaries, key Rect, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
float PDF::Annot::GetStrokeOpacity | ( | ) | const |
Get the stroke opacity of this annotation.
This is the transparency of the of the annotation's border or outline. For more information refer to section 12.5.2 Annotation dictionaries, Table 166 — Entries common to all annotation dictionaries, key 'CA', from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
PDAtom PDF::Annot::GetSubtype | ( | ) | const |
Get the subtype of this annotation.
This represents the Subtype entry of an Annotation dictionary. There are a number of annotation types depending on the purpose they are intended to serve, such as displaying a text block or a link to another place within the document. For a comprehensive list of the different annotation types refer to section 12.5.6 Annotation types, Table 171 - Annotation types from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
QuadPoints PDF::Annot::GetTextMarkupQuadPoints | ( | ) | const |
Get the quad points of the text markup annotation.
Quad points define the coordinates of the quadrilaterals (usually rectangles) that enclose the text being annotated. These points help in highlighting, underlining, striking out, or otherwise marking up specific sections of text being annotated. For more information refer to section 12.5.6.10 Text markup annotations, Table 182 — Additional entries specific to text markup annotations, key QuadPoints, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
PDColorValue PDF::Annot::GetWidgetBackgroundColor | ( | ) | const |
Get the background color of the widget annotation.
For more information refer to section 12.5.6.19 Widget annotations, Table 191 — Additional entries specific to a widget annotation, key BG.
PDColorValue PDF::Annot::GetWidgetBorderColor | ( | ) | const |
Get the border color of the widget annotation.
For more information refer to section 12.5.6.19 Widget annotations, Table 191 — Additional entries specific to a widget annotation, key BC.
PDAnnotBorderStyle PDF::Annot::GetWidgetBorderStyle | ( | ) | const |
Get the border style of the widget annotation.
Retrieves the width and dash pattern used in drawing the annotation’s border. This includes the visual style of the borders around the annotation like the line width, type (solid/dashed/bevelled/inset/underline) and dash appearance (if dashed). For more information refer to section 12.5.6.19 Widget annotations, Table 191 — Additional entries specific to a widget annotation, key BS, and section 12.5.4 Border styles, Table 168 — Entries in a border style dictionary.
PDColorValue PDF::Annot::GetWidgetFontColor | ( | ) | const |
Get the font color of the widget annotation.
PDFontInfo PDF::Annot::GetWidgetFontInfo | ( | ) | const |
Get the font information of the widget annotation.
This includes the font family, format and style (regular/italic/bold/bolditalic).
float PDF::Annot::GetWidgetFontSize | ( | ) | const |
Get the font size of the widget annotation.
Gets the font size from the interactive form field this widget annotates.
FormField PDF::Annot::GetWidgetParent | ( | ) | const |
Get the parent form field of the widget annotation.
Widget annotations are used by Interactive Forms to represent the appearance of fields and to manage user interactions. For more information refer to section 12.5.6.19 Widget annotations, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
PDRotate PDF::Annot::GetWidgetRotate | ( | ) | const |
Get the rotation angle of the widget annotation.
Widget annotations are used by Interactive Forms to represent the appearance of fields and to manage user interactions. A widget annotation dictionary MK entry is itself a dictionary that provides appearance characteristics for the annotation's appearance stream. It's R (rotation) entry specifies the CCW degrees of rotation in multiples of 90. For more information refer to section 12.5.6.19 Widget annotations, Table 191 — Additional entries specific to a widget annotation, key MK and Table 192 — Entries in an appearance characteristics dictionary, key R, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
bool PDF::Annot::HasAppearance | ( | PDAnnotState | state, |
PDAtom | appState ) const |
Check if an annotation has an appearance state defined for one of the three states (Normal, Rollover, Down).
This would indicate whether an annotation's look has a special definition when the annotation is being clicked on, rolled over, or displayed normally (state) - for an appState like "On" or "Off" (mostly used for checkboxes and radio buttons). A checkbox can be made to look differently whether viewed normally, hovered over or pressed, but by associating these three states, with an appState - the box can be made to look in two distinct ways when hovered over, depending on whether it is checked (appState = "On") or not (appState like "Off"). The same applies to the normal and pressed states.
[in] | state | The state to check for an association with an appState. One of Normal, Rollover, Down. |
[in] | appState | The appearance state to check (i.e."On" or "Off" for a checkbox) |
size_t PDF::Annot::HitTestFreeTextChar | ( | const PointF & | pagePt | ) | const |
Perform a hit test to determine which character in the free text annotation is at the specified point.
[in] | pagePt | A reference to the point on the page to perform the hit test at. |
bool PDF::Annot::IsMarkupAnnot | ( | ) | const |
Check if this annotation is a markup annotation.
For more information refer to section 12.5.6.2 Markup annotations from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
bool PDF::Annot::IsTextOpen | ( | ) | const |
Check if the text or popup annotation is set to be shown.
For more information refer to section 12.5.6.4 Text annotations, Table 175 — Additional entries specific to a text annotation, key Open, and section 12.5.6.14 Popup annotations, Table 186 — Additional entries specific to a popup annotation, key Open, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
bool PDF::Annot::IsVisible | ( | ) | const |
Check if this annotation is visible.
bool PDF::Annot::IsVisibleInConfig | ( | OCConfig | config | ) | const |
Check if an annotation is visible in a given optional content (OC) configuration.
[in] | config | The optional content (OC) configuration to check for annotation visibility. |
void PDF::Annot::RemoveLinkActions | ( | ) |
Remove all link actions associated with this annotation.
An action allows for a wide range of interactive behaviour like navigating to a different page, opening a web page, executing a JavaScript function, or performing other tasks. For more information refer to section 12.6 Actions from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
void PDF::Annot::SetAppearance | ( | PDAnnotState | state, |
PDAtom | appState, | ||
XObject | app ) |
Set the appearance for an annotation for the given state and appearance state.
An additional appearance state (PDAtom appState) can be specified as an alternative to a simple border and color specification. This is achieved by the use of an appearance stream (app XObject), rendered inside the annotation's rectangle. There are normal, rollover, and down appearances (PDAnnotState state) defined in the appearance dictionary. For example when check box is hovered over (PDAnnotState state = hover), it can look different depending on whether it is checked (PDAtom appState = On) or unchecked (PDAtom appState = Off) For more information refer to section 12.5.2 Annotation dictionaries, Table 166 — Entries common to all annotation dictionaries, keys AP and AS and section 12.5.5 Appearance streams Table 170 — Entries in an appearance dictionary, also see the example below the table for the appearance dictionary representation. from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | state | The state to set. One of Normal, Rollover, Down. |
[in] | appState | The appearance state to set. (i.e. "On" or "Off" for a checkbox) |
[in] | app | The appearance graphics object to use. |
void PDF::Annot::SetAppearanceState | ( | PDAtom | appState | ) |
Set the appearance state for an annotation.
An additional appearance state (PDAtom appState) can be specified as an alternative to a simple border and color specification. This is achieved by the use of an appearance stream (form XObject), rendered inside the annotation's rectangle. There are normal, rollover, and down appearances (PDAnnotState state) defined in the appearance dictionary. For example when check box is hovered over (PDAnnotState state = hover), it can look different depending on whether it is checked (PDAtom appState = On) or unchecked (PDAtom appState = Off) For more information refer to section 12.5.2 Annotation dictionaries, Table 166 — Entries common to all annotation dictionaries, keys AP and AS and section 12.5.5 Appearance streams Table 170 — Entries in an appearance dictionary, also see the example below the table for the appearance dictionary representation. from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | appState | The appearance state to set. |
void PDF::Annot::SetBlendMode | ( | PDEBlendMode | blendMode | ) |
Set the blend mode of this annotation.
For more information on refer to sections 11.3.5 Blend mode and 12.5.2 Annotation dictionaries, Table 166 — Entries common to all annotation dictionaries, key BM, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | blendMode | The blend mode to set. |
void PDF::Annot::SetBorder | ( | const PDAnnotBorder & | border | ) |
Sets the border for an annotation.
A square annotation border is defined by its width, the radii of its horizontal and vertical corners and a dash pattern if the border shall be defined as dashed. For more information refer to section 12.5.2 Annotation dictionaries, Table 166 — Entries common to all annotation dictionaries, key Border, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | border | A reference to the border to set. |
void PDF::Annot::SetColor | ( | PDColorValue | color | ) |
Set the color of this annotation.
color | The desired color to set the annotation to. |
void PDF::Annot::SetContents | ( | const std::wstring & | contents | ) |
Set the contents of this annotation.
The text that shall be displayed for the annotation or, if this type of annotation does not display text, an alternative description of the annotation’s contents in human-readable form. For more information refer to section 12.5.2 Annotation dictionaries, Table 166 — Entries common to all annotation dictionaries, key Contents, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | contents | A reference to the contents to set in wide character string format. |
void PDF::Annot::SetFillOpacity | ( | float | opacity | ) |
Set the fill opacity of an annotation.
This is the transparency of the interior of an annotation's shape. For more information refer to section 12.5.2 Annotation dictionaries, Table 166 — Entries common to all annotation dictionaries, key 'ca' from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | opacity | The fill opacity to set. |
void PDF::Annot::SetFlags | ( | PDAnnotFlags | flags | ) |
Set the flags of this annotation.
Annotation flags specify various behavior characteristics of an annotation. There are ten possible flags that can be set. They influence whether for example an annotation is printed when the document is printed, whether the annotation is shown enlarged when the page is magnified etc. For more information refer to section 12.5.3 Annotation flags, Table 167 - Annotation flags from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | flags | The flags to set. |
void PDF::Annot::SetFreeTextBorderColor | ( | PDColorValue | borderColor | ) |
Set the border color of the free text annotation.
This information will be stored inside the Appearance Characteristics Dictionary (MK). Its BC entry will hold information regarding the border color.
[in] | borderColor | The border color to set. |
void PDF::Annot::SetFreeTextBorderEffect | ( | const PDAnnotBorderEffect & | borderEffect | ) |
Set the border effect of the free text annotation.
The border style specifies the line width and dash pattern that shall be used in drawing the annotation’s border. For more information refer to 12.5.6.6 Free text annotations, Table 177 — Additional entries specific to a free text annotation, key BE and section 12.5.4 Border styles, Table 169 — Entries in a border effect dictionary, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | borderEffect | The border effect to set. |
void PDF::Annot::SetFreeTextBorderStyle | ( | const PDAnnotBorderStyle & | borderStyle | ) |
Set the border style of the free text annotation.
The border style specifies the line width and dash pattern that shall be used in drawing the annotation’s border. For more information refer to sections 12.5.6.6 Free text annotations, Table 177 — Additional entries specific to a free text annotation, key BS, and section 12.5.4 Border styles, Table 168 — Entries in a border style dictionary from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | borderStyle | A reference to he border style to set. |
void PDF::Annot::SetFreeTextCharSpacing | ( | float | charSpacing | ) |
Set the character spacing of the free text annotation.
For more information refer to section 9.3.2 Character spacing from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | charSpacing | The character spacing to set. |
void PDF::Annot::SetFreeTextFontColor | ( | PDColorValue | fontColor | ) |
Set the font color of the free text annotation.
This information will be stored within the default appearance (DA) string of its annotation dictionary. For more information refer to 12.5.6.6 Free text annotations, Table 177 — Additional entries specific to a free text annotation, key DA, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | fontColor | The font color to set. |
void PDF::Annot::SetFreeTextFontInfo | ( | const PDFontInfo & | fontInfo | ) |
Set the font information of the free text annotation.
This includes the font family, format and style (regular/italic/bold/bolditalic).
[in] | fontInfo | A reference to the font information to set. |
void PDF::Annot::SetFreeTextFontSize | ( | float | fontSize | ) |
Set the font size of the free text annotation.
This information will be contained within the default appearance (DA) string within its annotation dictionary. For more information refer to 12.5.6.6 Free text annotations, Table 177 — Additional entries specific to a free text annotation, key DA, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | fontSize | The font size to set. |
void PDF::Annot::SetFreeTextLineEnding | ( | PDAtom | endPointStyle | ) |
Set the line ending style of the free text annotation.
Specify the line ending style that shall be used when drawing a callout line (i.e. OpenArrow ->) For more information refer to section 12.5.6.6 Free text annotations, Table 177 — Additional entries specific to a free text annotation, key LE. The line ending names are described in section 12.5.6.7 Line annotations Table 179 — Line ending styles from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | endPointStyle | The line ending style to set. |
void PDF::Annot::SetFreeTextLineSpacing | ( | float | lineSpacing | ) |
Set the line spacing of the free text annotation.
[in] | lineSpacing | The line spacing to set to. |
void PDF::Annot::SetFreeTextQuadding | ( | PDQuadding | quadding | ) |
Set the text alignment of the free text annotation.
The text can be left-justified, centered or right-justified. For more information refer to section 12.5.6.6 Free text annotations, Table 177 — Additional entries specific to a free text annotation, key Q, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | quadding | The text alignment to set. Left-justified, centered or right-justified. |
void PDF::Annot::SetFreeTextRectDifferences | ( | const RectF & | differences | ) |
Set the differences in rectangle coordinates between the annotation rectangle and text rectangle within.
A set of four numbers describing the numerical differences between two rectangles - the Rect entry from the free text annotation dictionary (defining the location of the annotation on the page) and the inner rectangle where the annotation’s text should be displayed. For more information refer to section 12.5.6.6 Free text annotations, Table 177 — Additional entries specific to a free text annotation, key RD, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | differences | A reference to the differences in rectangle coordinates to set. |
void PDF::Annot::SetFreeTextRotate | ( | PDRotate | rotate | ) |
Set the rotation angle of the free text annotation.
This information will be set in the appearance characteristics dictionary of the free text annotation. For more information refer to section 12.5.6.6 Free text annotations from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | rotate | The rotation angle to set. One of 0, 90, 180 or 270 Deg. |
void PDF::Annot::SetInkPointsList | ( | const std::vector< std::vector< PointF > > & | pointslist | ) |
Set the list of ink points of the ink annotation.
The ink points, when connected by a stroke (a path) represents the freehand signature or note created by a user. InkList is an 2D array of points, where each sub-array (vector) represents a stroke made by the user. Each point is defined by its X and Y coordinates in floating-point representation. For more information refer to section 12.5.6.13 Ink annotations, and Table 185 — Additional entries specific to an ink annotation, key InkList from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | pointslist | A reference to the list of ink points to set. Provided in a 2D array (a vector of vectors). |
void PDF::Annot::SetLinkActions | ( | const Action & | actions | ) |
Set the link actions of this annotation.
An action allows for a wide range of interactive behaviour like navigating to a different page, opening a web page, executing a JavaScript function, or performing other tasks. For more information refer to section 12.6 Actions from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | actions | A reference to the link actions to set. |
void PDF::Annot::SetLinkBorderStyle | ( | const PDAnnotBorderStyle & | borderStyle | ) |
Set the border style for a link annotation.
For more information refer to section 12.5.6.5 Link annotations, Table 176 — Additional entries specific to a link annotations, key BS.
[in] | borderStyle | A reference to the border style to set. Specifies visual style of the borders around an annotation like the line width, type (solid/dashed/bevelled/inset/underline) and dash appearance (if dashed). |
void PDF::Annot::SetLinkDest | ( | const Dest & | dest | ) |
Set the link destination of this annotation.
A destination that shall be displayed when the annotation is activated. This function should only be used if an action has not already been set for the particular annotation using the SetLinkActions function. For more information refer to section 12.5.6.5 Link annotations Table 176 — Additional entries specific to a link annotation, key Dest.
[in] | dest | A reference to the link destination to set. |
void PDF::Annot::SetLinkQuadPoints | ( | const QuadPoints & | quadpoints | ) |
Set the link quad points of this annotation.
Quad points comprise the region in which the link should be activated. For more information refer to section 12.5.6.5 Link annotations Table 176 — Additional entries specific to a link annotation, key QuadPoints, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | quadpoints | A reference to the link quad points to set. |
void PDF::Annot::SetMarkupCreationDate | ( | const PDDateTime & | date | ) |
Set the creation date of the markup annotation.
For more information refer to section 12.5.6.2 Markup annotations, Table 172 — Additional entries in an annotation dictionary specific to markup annotations, key CreationDate, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | date | A reference to the creation date to set the markup annotation to. |
void PDF::Annot::SetMarkupInReplyTo | ( | const Annot & | inReplyTo | ) |
Set the in reply to (IRT) for a markup annotation.
When a markup annotation is a reply to another annotation this function will create the reference relationship. For more information refer to section 12.5.6.2 Markup annotations, Table 172 — Additional entries in an annotation dictionary specific to markup annotations, key IRT, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | inReplyTo | A reference to the annotation which this markup annotation is in reply to. |
void PDF::Annot::SetMarkupIntent | ( | PDAtom | intent | ) |
Set the intent of the markup annotation.
A name describing the intent of the markup annotation. Intents allow interactive PDF processors to distinguish between different uses and behaviours of a single markup annotation type. 12.5.6.2 Markup annotations, Table 172 — Additional entries in an annotation dictionary specific to markup annotations, key IT, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | intent | The intent to set. |
void PDF::Annot::SetMarkupReplyType | ( | PDMarkupAnnotReplyType | replyType | ) |
Set the reply type for a markup annotation.
Users can reply directly to a specific annotation or comment, or can group multiple annotations or comments together. For more information refer to section 12.5.6.2 Markup annotations, Table 172 — Additional entries in an annotation dictionary specific to markup annotations, key RT, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | replyType | The reply type to set. This can be on of: Reply or Group. |
void PDF::Annot::SetMarkupRichContents | ( | const std::wstring & | contents | ) |
Set the rich contents of a markup annotation.
This can be done inside an XML Forms Architecture (XFA), or standalone. For more information refer to section 12.5.6.2 Markup annotations, Table 172 — Additional entries in an annotation dictionary specific to markup annotations, key RC, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | contents | A reference to the rich text contents to set, in wide character string format. |
void PDF::Annot::SetMarkupSubject | ( | const std::wstring & | subject | ) |
Set the subject of the markup annotation.
For more information refer to section 12.5.6.2 Markup annotations, Table 172 — Additional entries in an annotation dictionary specific to markup annotations, key Subj, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | subject | The subject to set for this markup annotation, in wide character string format. |
void PDF::Annot::SetMarkupTitle | ( | const std::wstring & | title | ) |
Set the title of the markup annotation.
For more information refer to section 12.5.6.2 Markup annotations, Table 172 — Additional entries in an annotation dictionary specific to markup annotations, key T, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | title | A reference to the title to set in wide character string format. (i.e. L"Sticky Note"). |
void PDF::Annot::SetModDate | ( | const PDDateTime & | date | ) |
Set the modification date of this annotation.
For more information refer to section 12.5.2 Annotation dictionaries, Table 166 — Entries common to all annotation dictionaries key M, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | date | The modification date to set. |
void PDF::Annot::SetName | ( | const std::wstring & | name | ) |
Set the name for an annotation.
[in] | name | The annotation name in wide character string format (i.e L"Name of annotation"). |
void PDF::Annot::SetOCMD | ( | OCMembership | ocmd | ) |
Set the optional content (OC) membership dictionary for this annotation.
Before an annotation is drawn, its visibility shall be specified by using this function as well as by setting the annotation flags via the SetFlags() function. For more information refer to section 8.11.2.2 Optional content membership dictionaries and section 12.5.2 Annotation dictionaries Table 166 — Entries common to all annotation dictionaries, key OC, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | ocmd | The optional content (OC) membership dictionary to set. |
void PDF::Annot::SetRect | ( | const PDF::RectF & | rect | ) |
Set the rectangle of this annotation.
This represents the Rect entry of an Annotation dictionary. It defins the location of the annotation on the page in default user space units. The rectangle is defined by its lower-left (x1, y1) and upper-right (x2, y2) points (i.e. [x1, y1, x2, y2]) in reference to the origin - the lower-left corner of the page (0, 0). For more information refer to section 12.5.2 Annotation dictionaries, Table 166 - Entries common to all annotation dictionaries, key Rect, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | rect | A reference to the rectangle to set. |
void PDF::Annot::SetStrokeOpacity | ( | float | opacity | ) |
Set the stroke opacity of this annotation.
This is the transparency of the of the annotation's border or outline. For more information refer to section 12.5.2 Annotation dictionaries, Table 166 — Entries common to all annotation dictionaries, key 'CA', from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | opacity | The stroke opacity to set. |
void PDF::Annot::SetTextMarkupQuadPoints | ( | const QuadPoints & | quads | ) |
Set the quad points of the text markup annotation.
Quad points define the coordinates of the quadrilaterals (usually rectangles) that enclose the text being annotated. These points help in highlighting, underlining, striking out, or otherwise marking up specific sections of text being annotated. For more information refer to section 12.5.6.10 Text markup annotations, Table 182 — Additional entries specific to text markup annotations, key QuadPoints, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | quads | A reference to the quad points to set. |
void PDF::Annot::SetTextOpen | ( | bool | open | ) |
Set the open state of the text or popup annotation (having a parent markup annotation).
For more information refer to section 12.5.6.4 Text annotations, Table 175 — Additional entries specific to a text annotation, key Open, and section 12.5.6.14 Popup annotations, Table 186 — Additional entries specific to a popup annotation, key Open, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | open | A flag specifying whether the annotation shall initially be displayed open |
void PDF::Annot::SetVisible | ( | bool | visible | ) |
Set the visibility of this annotation.
[in] | visible | The visibility to set. |
void PDF::Annot::SetWidgetBackgroundColor | ( | PDColorValue | color | ) |
Set the background color of the widget annotation.
For more information refer to section 12.5.6.19 Widget annotations, Table 191 — Additional entries specific to a widget annotation, key BG.
color | The background color. |
void PDF::Annot::SetWidgetBorderColor | ( | PDColorValue | color | ) |
Set the border color of the widget annotation.
For more information refer to section 12.5.6.19 Widget annotations, Table 191 — Additional entries specific to a widget annotation, key BC.
color | The border color. |
void PDF::Annot::SetWidgetBorderStyle | ( | PDAnnotBorderStyle | borderStyle | ) |
Set the border style of the widget annotation.
Retrieves the width and dash pattern used in drawing the annotation’s border. This includes the visual style of the borders around the annotation like the line width, type (solid/dashed/bevelled/inset/underline) and dash appearance (if dashed). For more information refer to section 12.5.6.19 Widget annotations, Table 191 — Additional entries specific to a widget annotation, key BS, and section 12.5.4 Border styles, Table 168 — Entries in a border style dictionary.
borderStyle | The border style for this widget annotation. |
void PDF::Annot::SetWidgetFontColor | ( | PDColorValue | color | ) |
Set the font color of the widget annotation.
color | The font color. |
void PDF::Annot::SetWidgetFontInfo | ( | const PDFontInfo & | fontInfo | ) |
Set the font information of the widget annotation.
This includes the font family, format and style (regular/italic/bold/bolditalic).
fontInfo | The font information. |
void PDF::Annot::SetWidgetFontSize | ( | float | fontSize | ) |
Set the font size of the widget annotation.
Gets the font size from the interactive form field this widget annotates.
fontSize | The font size. |
void PDF::Annot::SetWidgetRotate | ( | PDRotate | rotate | ) |
Set the rotation angle of the widget annotation.
Widget annotations are used by Interactive Forms to represent the appearance of fields and to manage user interactions. A widget annotation dictionary MK entry is itself a dictionary that provides appearance characteristics for the annotation's appearance stream. It's R (rotation) entry specifies the CCW degrees of rotation in multiples of 90. For more information refer to section 12.5.6.19 Widget annotations, Table 191 — Additional entries specific to a widget annotation, key MK and Table 192 — Entries in an appearance characteristics dictionary, key R, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
rotate | The CCW rotation angle relative to the page. |