PDF SDK Documentation

Comprehensive Guide for Developers: Features, Integration, and API Reference

Loading...
Searching...
No Matches
PDF::Annot Class Reference

Represents an annotation in a PDF document. More...

#include <pdfsdk/cxx/annot.h>

Inheritance diagram for PDF::Annot:

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
 
Annotoperator= (const Annot &rhs) noexcept
 
 Annot (Annot &&rhs) noexcept
 
Annotoperator= (Annot &&rhs) noexcept
 

Detailed Description

Represents an annotation in a PDF document.

ISO 32000-2:2020 - 12.5 Annotations

Member Function Documentation

◆ Equals()

bool PDF::Annot::Equals ( const Annot & that) const

Check if this annotation is equal to another annotation.

Parameters
[in]thatA reference to the other annotation to compare to.
Returns
True if the annotations are equal, false otherwise.

◆ GetAppearance()

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.

Parameters
[in]stateThe state to get the (XObject) for. One of Normal, Rollover, Down.
See also
PDAnnotState
Parameters
[in]appStateThe appearance state to get the (XObject) for. (i.e. "On" or "Off" for a checkbox)
Returns
The appearance graphics object.

◆ GetAppearanceState()

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.

Returns
The appearance state.

◆ GetBlendMode()

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.

Returns
The blend mode.
See also
PDEBlendMode

◆ GetBorder()

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.

Returns
The border.
See also
PDAnnotBorder

◆ GetColor()

PDColorValue PDF::Annot::GetColor ( ) const

Get the color of this annotation.

Returns
The annotation color of the annotation.

◆ GetContents()

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.

Returns
The contents in wide character string format.

◆ GetFillOpacity()

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.

Returns
The fill opacity.

◆ GetFlags()

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.

Returns
The flags.

◆ GetFreeTextBorderColor()

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.

Returns
The border color.
See also
PDColorValue

◆ GetFreeTextBorderEffect()

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.

Returns
The border effect.

◆ GetFreeTextBorderStyle()

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.

Returns
The border style.
See also
PDAnnotBorderStyle

◆ GetFreeTextCharQuad()

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.

Parameters
[in]indexThe index of the character.
Returns
The quad representing the bounding box of the character.

◆ GetFreeTextCharSpacing()

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.

Returns
The character spacing.

◆ GetFreeTextFirstCharOnLine()

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.

Parameters
[in]lineIndexThe index of the line.
Returns
The index of the first character on the line.

◆ GetFreeTextFontColor()

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.

Returns
The font color.

◆ GetFreeTextFontInfo()

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).

Returns
The font information.
See also
PDFontInfo

◆ GetFreeTextFontSize()

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.

Returns
The font size.

◆ GetFreeTextLineEnding()

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.

Returns
The callout line ending style.

◆ GetFreeTextLineSpacing()

float PDF::Annot::GetFreeTextLineSpacing ( ) const

Get the line spacing of the free text annotation.

Returns
The line spacing.

◆ GetFreeTextLineWithChar()

size_t PDF::Annot::GetFreeTextLineWithChar ( size_t charIndex) const

Get the index of the line containing the specified character for a free text annotation.

Parameters
[in]charIndexThe index of the character.
Returns
The index of the line that contains the character.

◆ GetFreeTextNumLines()

size_t PDF::Annot::GetFreeTextNumLines ( ) const

Get the number of lines contained in the free text annotation.

Returns
The number of lines.

◆ GetFreeTextQuadding()

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.

Returns
The text alignment. Left-justified, centered or right-justified.
See also
PDQuadding

◆ GetFreeTextRectDifferences()

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.

Returns
The differences in rectangle coordinates.

◆ GetFreeTextRotate()

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.

Returns
The rotation angle. One of 0, 90, 180 or 270 Deg.

◆ GetInkPointsList()

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.

Returns
The list of ink points held in a 2D array (a vector of vectors).

◆ GetLinkActions()

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.

Returns
The link actions.
See also
Action

◆ GetLinkBorderStyle()

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.

Returns
The link border style.
See also
PDAnnotBorderStyle

◆ GetLinkDest()

Dest PDF::Annot::GetLinkDest ( ) const

Get the link destination of this annotation.

A destination that shall be displayed when the annotation is activated.

Returns
The link destination.
See also
Dest For more information refer to section 12.3.2 Destinations from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.

◆ GetLinkQuadPoints()

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.

Returns
The link quad points.

◆ GetMarkupCreationDate()

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.

Returns
The creation date.

◆ GetMarkupInReplyTo()

Annot PDF::Annot::GetMarkupInReplyTo ( ) const

Get the annotation that this markup annotation is in reply to.

Returns
The annotation which this markup annotation is in reply to.

◆ GetMarkupIntent()

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.

Returns
The intent describing the markup annotation.

◆ GetMarkupPopup()

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.

Returns
The popup annotation associated with this annotation. A popup annotation displays text in a popup window for entry and editing. It shall not appear alone but is associated with a markup (parent) annotation. For more information refer to 12.5.6.14 Popup annotations, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.

◆ GetMarkupReplyType()

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.

Returns
The reply type. This can be on of: Reply or Group.
See also
PDMarkupAnnotReplyType

◆ GetMarkupRichContents()

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.

Returns
The rich text contents in wide character string format.

◆ GetMarkupSubject()

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.

Returns
The subject for this markup annotation in wide character string format.

◆ GetMarkupTitle()

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.

Returns
The title for this markup annotation in wide character string format.

◆ GetModDate()

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.

Returns
The modification date.
See also
PDDateTime For more information refer to section 7.9.4 Dates, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.

◆ GetName()

std::wstring PDF::Annot::GetName ( ) const

Get the name for an annotation.

Returns
The name of the annotation in wide character string format (i.e L"Name of annotation").

◆ GetOCMD()

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.

Returns
The optional content membership dictionary.
See also
OCMembership

◆ GetPdfObject()

Object PDF::Annot::GetPdfObject ( ) const

Get the PDF object associated with this annotation.

Returns
The PDF object.

◆ GetRect()

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.

Returns
The annotation rectangle.

◆ GetStrokeOpacity()

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.

Returns
The stroke opacity.

◆ GetSubtype()

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.

Returns
The annotation subtype.

◆ GetTextMarkupQuadPoints()

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.

Returns
The quad points.

◆ GetWidgetBackgroundColor()

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.

Returns
The background color.

◆ GetWidgetBorderColor()

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.

Returns
The border color.

◆ GetWidgetBorderStyle()

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.

Returns
The border style set for this widget annotation.

◆ GetWidgetFontColor()

PDColorValue PDF::Annot::GetWidgetFontColor ( ) const

Get the font color of the widget annotation.

Returns
The font color.

◆ GetWidgetFontInfo()

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).

Returns
The font information.
See also
PDFontInfo

◆ GetWidgetFontSize()

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.

Returns
The font size.

◆ GetWidgetParent()

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.

Returns
The parent form field.

◆ GetWidgetRotate()

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.

Returns
The CCW rotation angle relative to the page.

◆ HasAppearance()

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.

Parameters
[in]stateThe state to check for an association with an appState. One of Normal, Rollover, Down.
See also
PDAnnotState
Parameters
[in]appStateThe appearance state to check (i.e."On" or "Off" for a checkbox)
Returns
True if the annotation has an appearance state defined for this state, false otherwise.

◆ HitTestFreeTextChar()

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.

Parameters
[in]pagePtA reference to the point on the page to perform the hit test at.
Returns
The index of the character at the specified point, or -1 if no character is found.

◆ IsMarkupAnnot()

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.

Returns
True if the annotation is a markup annotation, false otherwise.

◆ IsTextOpen()

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.

Returns
True if the annotation is set to be displayed, false otherwise.

◆ IsVisible()

bool PDF::Annot::IsVisible ( ) const

Check if this annotation is visible.

Returns
True if the annotation is visible, false otherwise.

◆ IsVisibleInConfig()

bool PDF::Annot::IsVisibleInConfig ( OCConfig config) const

Check if an annotation is visible in a given optional content (OC) configuration.

Parameters
[in]configThe optional content (OC) configuration to check for annotation visibility.
See also
OCConfig
Returns
True if the annotation is visible in the configuration, false otherwise.

◆ RemoveLinkActions()

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.

◆ SetAppearance()

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.

Parameters
[in]stateThe state to set. One of Normal, Rollover, Down.
See also
PDAnnotState
Parameters
[in]appStateThe appearance state to set. (i.e. "On" or "Off" for a checkbox)
[in]appThe appearance graphics object to use.

◆ SetAppearanceState()

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.

Parameters
[in]appStateThe appearance state to set.
See also
PDAtom

◆ SetBlendMode()

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.

Parameters
[in]blendModeThe blend mode to set.

◆ SetBorder()

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.

Parameters
[in]borderA reference to the border to set.
See also
PDAnnotBorder

◆ SetColor()

void PDF::Annot::SetColor ( PDColorValue color)

Set the color of this annotation.

Parameters
colorThe desired color to set the annotation to.

◆ SetContents()

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.

Parameters
[in]contentsA reference to the contents to set in wide character string format.

◆ SetFillOpacity()

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.

Parameters
[in]opacityThe fill opacity to set.

◆ SetFlags()

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.

Parameters
[in]flagsThe flags to set.
See also
PDAnnotFlags

◆ SetFreeTextBorderColor()

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.

Parameters
[in]borderColorThe border color to set.

◆ SetFreeTextBorderEffect()

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.

Parameters
[in]borderEffectThe border effect to set.

◆ SetFreeTextBorderStyle()

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.

Parameters
[in]borderStyleA reference to he border style to set.

◆ SetFreeTextCharSpacing()

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.

Parameters
[in]charSpacingThe character spacing to set.

◆ SetFreeTextFontColor()

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.

Parameters
[in]fontColorThe font color to set.

◆ SetFreeTextFontInfo()

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).

Parameters
[in]fontInfoA reference to the font information to set.

◆ SetFreeTextFontSize()

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.

Parameters
[in]fontSizeThe font size to set.

◆ SetFreeTextLineEnding()

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.

Parameters
[in]endPointStyleThe line ending style to set.

◆ SetFreeTextLineSpacing()

void PDF::Annot::SetFreeTextLineSpacing ( float lineSpacing)

Set the line spacing of the free text annotation.

Parameters
[in]lineSpacingThe line spacing to set to.

◆ SetFreeTextQuadding()

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.

Parameters
[in]quaddingThe text alignment to set. Left-justified, centered or right-justified.
See also
PDQuadding

◆ SetFreeTextRectDifferences()

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.

Parameters
[in]differencesA reference to the differences in rectangle coordinates to set.

◆ SetFreeTextRotate()

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.

Parameters
[in]rotateThe rotation angle to set. One of 0, 90, 180 or 270 Deg.

◆ SetInkPointsList()

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.

Parameters
[in]pointslistA reference to the list of ink points to set. Provided in a 2D array (a vector of vectors).

◆ SetLinkActions()

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.

Parameters
[in]actionsA reference to the link actions to set.
See also
Action

◆ SetLinkBorderStyle()

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.

Parameters
[in]borderStyleA 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).
See also
PDAnnotBorderStyle

◆ SetLinkDest()

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.

Parameters
[in]destA reference to the link destination to set.
See also
Dest For more information refer to section 12.3.2 Destinations from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.

◆ SetLinkQuadPoints()

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.

Parameters
[in]quadpointsA reference to the link quad points to set.
See also
QuadPoints

◆ SetMarkupCreationDate()

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.

Parameters
[in]dateA reference to the creation date to set the markup annotation to.

◆ SetMarkupInReplyTo()

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.

Parameters
[in]inReplyToA reference to the annotation which this markup annotation is in reply to.

◆ SetMarkupIntent()

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.

Parameters
[in]intentThe intent to set.

◆ SetMarkupReplyType()

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.

Parameters
[in]replyTypeThe reply type to set. This can be on of: Reply or Group.
See also
PDMarkupAnnotReplyType

◆ SetMarkupRichContents()

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.

Parameters
[in]contentsA reference to the rich text contents to set, in wide character string format.

◆ SetMarkupSubject()

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.

Parameters
[in]subjectThe subject to set for this markup annotation, in wide character string format.

◆ SetMarkupTitle()

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.

Parameters
[in]titleA reference to the title to set in wide character string format. (i.e. L"Sticky Note").

◆ SetModDate()

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.

Parameters
[in]dateThe modification date to set.
See also
PDDateTime For more information refer to section 7.9.4 Dates, from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.

◆ SetName()

void PDF::Annot::SetName ( const std::wstring & name)

Set the name for an annotation.

Parameters
[in]nameThe annotation name in wide character string format (i.e L"Name of annotation").

◆ SetOCMD()

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.

See also
SetFlags
Parameters
[in]ocmdThe optional content (OC) membership dictionary to set.
See also
OCMembership

◆ SetRect()

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.

Parameters
[in]rectA reference to the rectangle to set.
See also
RectF

◆ SetStrokeOpacity()

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.

Parameters
[in]opacityThe stroke opacity to set.

◆ SetTextMarkupQuadPoints()

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.

Parameters
[in]quadsA reference to the quad points to set.
See also
QuadPoints

◆ SetTextOpen()

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.

Parameters
[in]openA flag specifying whether the annotation shall initially be displayed open

◆ SetVisible()

void PDF::Annot::SetVisible ( bool visible)

Set the visibility of this annotation.

Parameters
[in]visibleThe visibility to set.

◆ SetWidgetBackgroundColor()

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.

Parameters
colorThe background color.

◆ SetWidgetBorderColor()

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.

Parameters
colorThe border color.

◆ SetWidgetBorderStyle()

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.

Parameters
borderStyleThe border style for this widget annotation.

◆ SetWidgetFontColor()

void PDF::Annot::SetWidgetFontColor ( PDColorValue color)

Set the font color of the widget annotation.

Parameters
colorThe font color.

◆ SetWidgetFontInfo()

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).

Parameters
fontInfoThe font information.
See also
PDFontInfo

◆ SetWidgetFontSize()

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.

Parameters
fontSizeThe font size.

◆ SetWidgetRotate()

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.

Parameters
rotateThe CCW rotation angle relative to the page.

The documentation for this class was generated from the following file: