#include <PdfAnnotation.h>
Inheritance diagram for PoDoFo::PdfAnnotation:
Public Member Functions | |
PdfAnnotation (PdfPage *pPage, EPdfAnnotation eAnnot, const PdfRect &rRect, PdfVecObjects *pParent) | |
PdfAnnotation (PdfObject *pObject, PdfPage *pPage) | |
void | SetAppearanceStream (PdfXObject *pObject) |
bool | HasAppearanceStream () const |
PdfRect | GetRect () const |
void | SetFlags (pdf_uint32 uiFlags) |
pdf_uint32 | GetFlags () const |
void | SetBorderStyle (double dHCorner, double dVCorner, double dWidth) |
void | SetBorderStyle (double dHCorner, double dVCorner, double dWidth, const PdfArray &rStrokeStyle) |
void | SetTitle (const PdfString &sTitle) |
PdfString | GetTitle () const |
void | SetContents (const PdfString &sContents) |
PdfString | GetContents () const |
void | SetDestination (const PdfDestination &rDestination) |
PdfDestination | GetDestination () const |
bool | HasDestination () const |
void | SetAction (const PdfAction &rAction) |
PdfAction * | GetAction () const |
bool | HasAction () const |
void | SetOpen (bool b) |
bool | GetOpen () const |
bool | HasFileAttachement () const |
void | SetFileAttachement (const PdfFileSpec &rFileSpec) |
PdfFileSpec * | GetFileAttachement () const |
PdfArray | GetQuadPoints () const |
void | SetQuadPoints (const PdfArray &rQuadPoints) |
PdfArray | GetColor () const |
void | SetColor (double r, double g, double b) |
void | SetColor (double c, double m, double y, double k) |
void | SetColor (double gray) |
void | SetColor () |
EPdfAnnotation | GetType () const |
PdfPage * | GetPage () const |
PoDoFo::PdfAnnotation::PdfAnnotation | ( | PdfPage * | pPage, | |
EPdfAnnotation | eAnnot, | |||
const PdfRect & | rRect, | |||
PdfVecObjects * | pParent | |||
) |
Create a new annotation object
pPage | the parent page of this annotation | |
eAnnot | type of the annotation | |
rRect | the rectangle in which the annotation will appear on the page | |
pParent | parent of this annotation |
Create a PdfAnnotation from an existing object
pObject | the annotations object | |
pPage | the page of the annotation |
PdfAction * PoDoFo::PdfAnnotation::GetAction | ( | ) | const |
Get the action that is executed for this annotation
PdfArray PoDoFo::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. The PdfArray contains 0 to four numbers, depending on the colorspace in which the color is specified 0 numbers means the annotation is transparent 1 number specifies the intensity of the color in grayscale 3 numbers specifie the color in the RGB colorspace and 4 numbers specify the color in the CMYK colorspace
PdfString PoDoFo::PdfAnnotation::GetContents | ( | ) | const |
PdfDestination PoDoFo::PdfAnnotation::GetDestination | ( | ) | const |
PdfFileSpec * PoDoFo::PdfAnnotation::GetFileAttachement | ( | ) | const |
Get a file attachement of this annotation.
pdf_uint32 PoDoFo::PdfAnnotation::GetFlags | ( | ) | const |
Get the flags of this annotation.
bool PoDoFo::PdfAnnotation::GetOpen | ( | ) | const |
PdfPage * PoDoFo::PdfAnnotation::GetPage | ( | ) | const [inline] |
Get the page of this PdfField
PdfArray PoDoFo::PdfAnnotation::GetQuadPoints | ( | ) | const |
Get the quad points associated with the annotation (if appropriate). This array is used in text markup annotations to describe the regions affected by the markup (i.e. the hilighted words, one quadrilateral per word)
PdfRect PoDoFo::PdfAnnotation::GetRect | ( | ) | const |
Get the rectangle of this annotation
PdfString PoDoFo::PdfAnnotation::GetTitle | ( | ) | const |
EPdfAnnotation PoDoFo::PdfAnnotation::GetType | ( | ) | const [inline] |
Get the type of this annotation
bool PoDoFo::PdfAnnotation::HasAction | ( | ) | const |
bool PoDoFo::PdfAnnotation::HasAppearanceStream | ( | ) | const |
bool PoDoFo::PdfAnnotation::HasDestination | ( | ) | const |
bool PoDoFo::PdfAnnotation::HasFileAttachement | ( | ) | const |
void PoDoFo::PdfAnnotation::SetAction | ( | const PdfAction & | rAction | ) |
Set the action that is executed for this annotation
rAction | an action object |
void PoDoFo::PdfAnnotation::SetAppearanceStream | ( | PdfXObject * | pObject | ) |
Set an appearance stream for this object to specify its visual appearance
pObject | an XObject |
void PoDoFo::PdfAnnotation::SetBorderStyle | ( | double | dHCorner, | |
double | dVCorner, | |||
double | dWidth, | |||
const PdfArray & | rStrokeStyle | |||
) |
Set the annotations border style.
dHCorner | horitzontal corner radius | |
dVCorner | vertical corner radius | |
dWidth | width of border | |
rStrokeStyle | a custom stroke style pattern |
void PoDoFo::PdfAnnotation::SetBorderStyle | ( | double | dHCorner, | |
double | dVCorner, | |||
double | dWidth | |||
) |
Set the annotations border style.
dHCorner | horitzontal corner radius | |
dVCorner | vertical corner radius | |
dWidth | width of border |
void PoDoFo::PdfAnnotation::SetColor | ( | ) |
Set the C key of the Annotation dictionary to an empty array, which, as per 8.4 of the pdf spec., makes the annotation transparent
void PoDoFo::PdfAnnotation::SetColor | ( | double | gray | ) |
Set the C key of the Annotation dictionary, which defines the color of the annotation, as per 8.4 of the pdf spec. Parameters give the color in grayscale colorspace coordinates
gray | number from 0 to 1, the intensity of the black |
void PoDoFo::PdfAnnotation::SetColor | ( | double | c, | |
double | m, | |||
double | y, | |||
double | k | |||
) |
Set the C key of the Annotation dictionary, which defines the color of the annotation, as per 8.4 of the pdf spec. Parameters give the color in cmyk colorspace coordinates
c | number from 0 to 1, the intensity of the cyan channel | |
m | number from 0 to 1, the intensity of the magneta channel | |
y | number from 0 to 1, the intensity of the yellow channel | |
k | number from 0 to 1, the intensity of the black channel |
void PoDoFo::PdfAnnotation::SetColor | ( | double | r, | |
double | g, | |||
double | b | |||
) |
Set the C key of the Annotation dictionary, which defines the color of the annotation, as per 8.4 of the pdf spec. Parameters give the color in rgb colorspace coordinates
r | number from 0 to 1, the intensity of the red channel | |
g | number from 0 to 1, the intensity of the green channel | |
b | number from 0 to 1, the intensity of the blue channel |
void PoDoFo::PdfAnnotation::SetContents | ( | const PdfString & | sContents | ) |
Set the text of this annotation.
sContents | text of the annoation as string in PDF format |
void PoDoFo::PdfAnnotation::SetDestination | ( | const PdfDestination & | rDestination | ) |
Set the destination for link annotations
rDestination | target of the link |
void PoDoFo::PdfAnnotation::SetFileAttachement | ( | const PdfFileSpec & | rFileSpec | ) |
Set a file attachment for this annotation. The type of this annotation has to be ePdfAnnotation_FileAttachement for file attachements to work.
rFileSpec | a file specification |
void PoDoFo::PdfAnnotation::SetFlags | ( | pdf_uint32 | uiFlags | ) |
Set the flags of this annotation.
uiFlags | is an unsigned 32bit integer with different EPdfAnnotationFlags OR'ed together. |
void PoDoFo::PdfAnnotation::SetOpen | ( | bool | b | ) |
Sets wether this annotation is initialy open. You should always set this true for popup annotations.
b | if true open it |
void PoDoFo::PdfAnnotation::SetQuadPoints | ( | const PdfArray & | rQuadPoints | ) |
Set the quad points associated with the annotation (if appropriate). This array is used in text markup annotations to describe the regions affected by the markup (i.e. the hilighted words, one quadrilateral per word)
rQuadPoints | a PdfArray of 8xn numbers describing the x,y coordinates of BL BR TR TL corners of the quadrilaterals. |
void PoDoFo::PdfAnnotation::SetTitle | ( | const PdfString & | sTitle | ) |
Set the title of this annotation.
sTitle | title of the annoation as string in PDF format |