PoDoFo 0.9.20
PoDoFo::PdfAnnotation Class Reference

#include <PdfAnnotation.h>

Public Member Functions

void SetAppearanceStream (const PdfXObjectForm &xobj, PdfAppearanceType appearance=PdfAppearanceType::Normal, const PdfName &state="")
 
void SetAppearanceStreamRaw (const PdfXObjectForm &xobj, PdfAppearanceType appearance=PdfAppearanceType::Normal, const PdfName &state="")
 
PdfObjectGetAppearanceDictionaryObject ()
 
PdfObjectGetAppearanceStream (PdfAppearanceType appearance=PdfAppearanceType::Normal, const PdfName &state="")
 
Rect GetRect () const
 
void SetRect (const Rect &rect)
 
void SetFlags (PdfAnnotationFlags flags)
 
PdfAnnotationFlags GetFlags () const
 
void SetBorderStyle (double hCorner, double vCorner, double width)
 
void SetBorderStyle (double hCorner, double vCorner, double width, const PdfArray &strokeStyle)
 
void SetTitle (nullable< const PdfString & > title)
 
nullable< const PdfString & > GetTitle () const
 
void SetContents (nullable< const PdfString & > contents)
 
nullable< const PdfString & > GetContents () const
 
PdfColor GetColor () const
 
void SetColor (nullable< const PdfColor & > color)
 
PdfAnnotationType GetType () const
 
PdfPageGetPage ()
 

Detailed Description

An annotation to a PdfPage To create an annotation use PdfPage::CreateAnnotation

See also
PdfPage::CreateAnnotation

Member Function Documentation

◆ GetAppearanceDictionaryObject()

PdfObject * PdfAnnotation::GetAppearanceDictionaryObject ( )
Returns
the appearance /AP object for this annotation

◆ GetAppearanceStream()

PdfObject * PdfAnnotation::GetAppearanceStream ( PdfAppearanceType appearance = PdfAppearanceType::Normal,
const PdfName & state = "" )
Returns
the appearance stream for this object
Parameters
appearancean apperance type to get
statea child state. Meaning depends on the annotation type

◆ GetColor()

PdfColor PdfAnnotation::GetColor ( ) const

Get the color key of the Annotation dictionary which defines the color of the annotation, as per 8.4 of the pdf spec.

◆ GetContents()

nullable< const PdfString & > PdfAnnotation::GetContents ( ) const

Get the text of this annotation

Returns
the contents of this annotation
See also
SetContents

◆ GetFlags()

PdfAnnotationFlags PdfAnnotation::GetFlags ( ) const

Get the flags of this annotation.

Returns
the flags which is an unsigned 32bit integer with different PdfAnnotationFlags OR'ed together.
See also
SetFlags

◆ GetPage()

PdfPage * PoDoFo::PdfAnnotation::GetPage ( )
inline

Get the page of this PdfField

Returns
the page of this PdfField

◆ GetRect()

Rect PdfAnnotation::GetRect ( ) const

Get the rectangle of this annotation.

Returns
a rectangle

◆ GetTitle()

nullable< const PdfString & > PdfAnnotation::GetTitle ( ) const

Get the title of this annotation

Returns
the title of this annotation
See also
SetTitle

◆ GetType()

PdfAnnotationType PoDoFo::PdfAnnotation::GetType ( ) const
inline

Get the type of this annotation

Returns
the annotation type

◆ SetAppearanceStream()

void PdfAnnotation::SetAppearanceStream ( const PdfXObjectForm & xobj,
PdfAppearanceType appearance = PdfAppearanceType::Normal,
const PdfName & state = "" )

Set an appearance stream for this object to specify its visual appearance

Parameters
xobjan XObject form
appearancean apperance type to set
statethe state for which set it the obj; states depend on the annotation type

◆ SetAppearanceStreamRaw()

void PdfAnnotation::SetAppearanceStreamRaw ( const PdfXObjectForm & xobj,
PdfAppearanceType appearance = PdfAppearanceType::Normal,
const PdfName & state = "" )

Set an appearance stream for this object to specify its visual appearance withot handling page rotations

Parameters
xobjan XObject form
appearancean apperance type to set
statethe state for which set it the obj; states depend on the annotation type

◆ SetBorderStyle() [1/2]

void PdfAnnotation::SetBorderStyle ( double hCorner,
double vCorner,
double width )

Set the annotations border style.

Parameters
hCornerhoritzontal corner radius
vCornervertical corner radius
widthwidth of border

◆ SetBorderStyle() [2/2]

void PdfAnnotation::SetBorderStyle ( double hCorner,
double vCorner,
double width,
const PdfArray & strokeStyle )

Set the annotations border style.

Parameters
hCornerhoritzontal corner radius
dVCornervertical corner radius
widthwidth of border
strokeStylea custom stroke style pattern

◆ SetColor()

void PdfAnnotation::SetColor ( nullable< const PdfColor & > color)

Set the C key of the Annotation dictionary, which defines the color of the annotation, as per 8.4 of the pdf spec.

◆ SetContents()

void PdfAnnotation::SetContents ( nullable< const PdfString & > contents)

Set the text of this annotation.

Parameters
contentstext of the annoation as string in PDF format
See also
GetContents

◆ SetFlags()

void PdfAnnotation::SetFlags ( PdfAnnotationFlags flags)

Set the flags of this annotation.

See also
GetFlags

◆ SetRect()

void PdfAnnotation::SetRect ( const Rect & rect)

Set the rectangle of this annotation.

Parameters
rectrectangle to set

◆ SetTitle()

void PdfAnnotation::SetTitle ( nullable< const PdfString & > title)

Set the title of this annotation.

Parameters
titletitle of the annoation as string in PDF format
See also
GetTitle