All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
pdftron::PDF::Annot Class Reference

#include <Annot.h>

+ Inheritance diagram for pdftron::PDF::Annot:

Public Types

enum  Type {
  e_Text, e_Link, e_FreeText, e_Line,
  e_Square, e_Circle, e_Polygon, e_Polyline,
  e_Highlight, e_Underline, e_Squiggly, e_StrikeOut,
  e_Stamp, e_Caret, e_Ink, e_Popup,
  e_FileAttachment, e_Sound, e_Movie, e_Widget,
  e_Screen, e_PrinterMark, e_TrapNet, e_Watermark,
  e_3D, e_Redact, e_Projection, e_RichMedia,
  e_Unknown
}
 
enum  Flag {
  e_invisible, e_hidden, e_print, e_no_zoom,
  e_no_rotate, e_no_view, e_read_only, e_locked,
  e_toggle_no_view, e_locked_contents
}
 
enum  ActionTriggerEvent {
  e_action_trigger_activate = 0, e_action_trigger_annot_enter = 1, e_action_trigger_annot_exit = 2, e_action_trigger_annot_down = 3,
  e_action_trigger_annot_up = 4, e_action_trigger_annot_focus = 5, e_action_trigger_annot_blur = 6, e_action_trigger_annot_page_open = 7,
  e_action_trigger_annot_page_close = 8, e_action_trigger_annot_page_visible = 9, e_action_trigger_annot_page_invisible = 10
}
 
enum  AnnotationState { e_normal, e_rollover, e_down }
 
typedef pdftron::PDF::BorderStyle BorderStyle
 

Public Member Functions

 Annot (SDF::Obj d=0)
 
 Annot (const Annot &d)
 
Annotoperator= (const Annot &d)
 
bool operator== (const Annot &d)
 
bool IsValid () const
 
SDF::Obj GetSDFObj () const
 
Type GetType () const
 
Rect GetRect () const
 
Rect GetVisibleContentBox () const
 
bool IsMarkup () const
 
void SetRect (const Rect &pos)
 
Page GetPage () const
 
void SetPage (const Page &page)
 
SDF::Obj GetUniqueID () const
 
void SetUniqueID (const char *id, int id_buf_sz=0)
 
Date GetDate () const
 
void SetDate (const Date &date)
 
bool GetFlag (Flag flag) const
 
void SetFlag (Flag flag, bool value)
 
SDF::Obj GetTriggerAction (Annot::ActionTriggerEvent trigger)
 
BorderStyle GetBorderStyle () const
 
void SetBorderStyle (const BorderStyle &bs, bool oldStyleOnly=false)
 
SDF::Obj GetAppearance (AnnotationState annot_state=e_normal, const char *app_state=0)
 
void SetAppearance (SDF::Obj app_stream, AnnotationState annot_state=e_normal, const char *app_state=0)
 
void RemoveAppearance (AnnotationState annot_state=e_normal, const char *app_state=0)
 
void Flatten (class Page page)
 
const char * GetActiveAppearanceState () const
 
void SetActiveAppearanceState (const char *astate)
 
ColorPt GetColorAsRGB () const
 
ColorPt GetColorAsCMYK () const
 
ColorPt GetColorAsGray () const
 
int GetColorCompNum () const
 
void SetColor (const ColorPt &col, int numcomp=3)
 
int GetStructParent () const
 
void SetStructParent (const int parkeyval)
 
SDF::Obj GetOptionalContent () const
 
void SetOptionalContent (SDF::Obj content)
 
void SetContents (const UString &contents)
 
UString GetContents () const
 
int GetRotation () const
 
void SetRotation (int angle)
 
void RefreshAppearance ()
 
void RefreshAppearance (const RefreshOptions &options)
 
UString GetCustomData (const UString &key) const
 
void SetCustomData (const UString &key, const UString &value)
 
void DeleteCustomData (const UString &key)
 
void Resize (const Rect &newrect)
 
ptrdiff_t GetHandleInternal ()
 

Static Public Member Functions

static Annot Create (SDF::SDFDoc &doc, Type type, const Rect &pos)
 
static AnnotCreateInternal (ptrdiff_t impl)
 

Detailed Description

Annot is a base class for different types of annotations. For annotation specific properties, please refer to derived classes.

An annotation is an interactive object placed on a page, such as a text note, a link, or an embedded file. PDF includes a wide variety of standard annotation types. An annotation associates an object such as a widget, note, or movie with a location on a page of a PDF document, or provides a means of interacting with the user via the mouse and keyboard. For more details on PDF annotations please refer to section 12.5 in the PDF Reference Manual and the documentation in derived classes.

Definition at line 33 of file Annot.h.

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
e_action_trigger_activate 
e_action_trigger_annot_enter 
e_action_trigger_annot_exit 
e_action_trigger_annot_down 
e_action_trigger_annot_up 
e_action_trigger_annot_focus 
e_action_trigger_annot_blur 
e_action_trigger_annot_page_open 
e_action_trigger_annot_page_close 
e_action_trigger_annot_page_visible 
e_action_trigger_annot_page_invisible 

Definition at line 302 of file Annot.h.

An annotation can define as many as three separate appearances:

  • The normal appearance is used when the annotation is not interacting with the user. This appearance is also used for printing the annotation.
  • The rollover appearance is used when the user moves the cursor into the annotation's active area without pressing the mouse button.
  • The down appearance is used when the mouse button is pressed or held down within the annotation's active area.
Enumerator
e_normal 
e_rollover 
e_down 

Definition at line 358 of file Annot.h.

Flags specifying various characteristics of the annotation.

  • If e_invisible is set, do not display the annotation if it does not belong to one of the standard annotation types and no annotation handler is available. If clear, display such an unknown annotation using an appearance stream specified by its appearance dictionary, if any.
  • If e_hidden is set, do not display or print the annotation or allow it to interact with the user, regardless of its annotation type or whether an annotation handler is available.
  • If e_print is set, print the annotation when the page is printed. If clear, never print the annotation, regardless of whether it is displayed on the screen. This can be useful, for example, for annotations representing interactive pushbuttons, which would serve no meaningful purpose on the printed page.
  • If e_no_zoom is set, do not scale the annotation's appearance to match the magnification of the page.
  • If e_no_rotate is set, do not rotate the annotation's appearance to match the rotation of the page.
  • If e_no_view is set, do not display the annotation on the screen or allow it to interact with the user. The annotation may be printed (depending on the setting of the Print flag) but should be considered hidden for purposes of on-screen display and user interaction.
  • If e_read_only is set, do not allow the annotation to interact with the user. The annotation may be displayed or printed (depending on the settings of the NoView and Print flags) but should not respond to mouse clicks or change its appearance in response to mouse motions.
  • If e_locked is set, do not allow the annotation to be deleted or its properties (including position and size) to be modified by the user. However, this flag does not restrict changes to the annotation's contents, such as the value of a form field.
  • If e_toggle_no_view is set, invert the interpretation of the NoView flag for certain events. A typical use is to have an annotation that appears only when a mouse cursor is held over it.
  • If e_locked_contents is set, do not allow the contents of the annotation to be modified by the user. This flag does not restrict deletion of the annotation or changes to other annotation properties, such as position and size.
Enumerator
e_invisible 
e_hidden 
e_print 
e_no_zoom 
e_no_rotate 
e_no_view 
e_read_only 
e_locked 
e_toggle_no_view 
e_locked_contents 

Definition at line 273 of file Annot.h.

PDF supports the standard annotation types listed in the following enumeration (plug-in extensions may add new annotation types):

Enumerator
e_Text 

Text annotation.

e_Link 

Link annotation.

e_FreeText 

Free text annotation.

e_Line 

Line annotation.

e_Square 

Square annotation.

e_Circle 

Circle annotation.

e_Polygon 

Polygon annotation.

e_Polyline 

Polyline annotation.

e_Highlight 

Highlight annotation.

e_Underline 

Underline annotation.

e_Squiggly 

Squiggly-underline annotation.

e_StrikeOut 

Strikeout annotation.

e_Stamp 

Rubber stamp annotation.

e_Caret 

Caret annotation.

e_Ink 

Ink annotation.

e_Popup 

Pop-up annotation.

e_FileAttachment 

File attachment annotation.

e_Sound 

Sound annotation.

e_Movie 

Movie annotation.

e_Widget 

Widget annotation.

e_Screen 

Screen annotation.

e_PrinterMark 

Printer's mark annotation.

e_TrapNet 

Trap network annotation.

e_Watermark 

Watermark annotation.

e_3D 

3D annotation

e_Redact 

Redact annotation.

e_Projection 

Projection annotation, Adobe supplement to ISO 32000.

e_RichMedia 

Rich Media annotation, Adobe supplement to ISO 32000.

e_Unknown 

Any other annotation type, not listed in PDF spec and unrecognized by PDFTron software.

Definition at line 41 of file Annot.h.

Constructor & Destructor Documentation

pdftron::PDF::Annot::Annot ( SDF::Obj  d = 0)

Create an annotation and initialize it using given Cos/SDF object.

Parameters
dThe Cos/SDF object to initialze the annotation with.
Note
The constructor does not copy any data, but is instead the logical equivalent of a type cast.
pdftron::PDF::Annot::Annot ( const Annot d)

Copy constructor

Member Function Documentation

static Annot pdftron::PDF::Annot::Create ( SDF::SDFDoc doc,
Type  type,
const Rect pos 
)
static

Creates a new annotation of a given type, in the specified document. The newly created annotation does not contain any properties specific to a given annotation type, which means an invalid annotation object could be created. It is therefore recommended to always create an annotation using type specific methods, such as Annots::Line::Create() or Annots::FileAttachment::Create(). Users should only call Annot::Create() to create annotations of non-standard types that are not recognized by PDFTron software (by using Annot::e_Unknown as a type).

Parameters
docA document to which the annotation is added.
typeSubtype of annotation to create.
posA rectangle specifying the annotation's bounds, specified in user space coordinates.
Returns
A newly created blank annotation for the given annotation type.
static Annot* pdftron::PDF::Annot::CreateInternal ( ptrdiff_t  impl)
static
void pdftron::PDF::Annot::DeleteCustomData ( const UString key)

Deletes custom data associated with the given key.

Parameters
keyThe key for which to delete the associated data.
void pdftron::PDF::Annot::Flatten ( class Page  page)

Flatten/Merge the existing annotation appearances with the page content and delete this annotation from a given page.

Annotation 'flattening' refers to the operation that changes active annotations (such as markup, widgets, 3D models, etc.) into a static area that is part of the PDF document, just like the other text and images in the document.

Note
an alternative approach to set the annotation as read only is using Annot.SetFlag(Annot::e_read_only, true) method. Unlike Annot.SetFlag(...), the result of Flatten() operation can not be programatically reversed.
const char* pdftron::PDF::Annot::GetActiveAppearanceState ( ) const

Gets the annotation's active appearance state.

Returns
the name of the active state. The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary.
SDF::Obj pdftron::PDF::Annot::GetAppearance ( AnnotationState  annot_state = e_normal,
const char *  app_state = 0 
)

Gets the annotation's appearance for the given combination of annotation and appearance states.

Parameters
annot_statethe annotation's appearance state, which selects the applicable appearance stream from the appearance sub-dictionary. An annotation can define as many as three separate appearances: The normal, rollover, and down appearance.
app_stateis an optional parameter specifying the appearance state to look for (e.g. "Off", "On", etc). If appearance_state is NULL, the choice between different appearance states is determined by the AS (Appearance State) entry in the annotation dictionary.
Returns
The appearance stream for this annotation, or NULL if the annotation does not have an appearance for the given combination of annotation and appearance states.
BorderStyle pdftron::PDF::Annot::GetBorderStyle ( ) const

Gets the border style for the annotation. Typically used for Link annotations.

Returns
Annotation's border style.
ColorPt pdftron::PDF::Annot::GetColorAsCMYK ( ) const

Returns the annotation's color in CMYK color space.

Returns
A ColorPt object containing an array of four numbers in the range 0.0 to 1.0, representing a CMYK color used for the following purposes:
  • The background of the annotation's icon when closed
  • The title bar of the annotation's pop-up window
  • The border of a link annotation

If the annotation does not specify an explicit color, a default color is returned. Text annotations return 'default yellow;' all others return black.

ColorPt pdftron::PDF::Annot::GetColorAsGray ( ) const

Returns the annotation's color in Gray color space.

Returns
A ColorPt object containing a number in the range 0.0 to 1.0, representing a Gray Scale color used for the following purposes: The background of the annotation's icon when closed The title bar of the annotation's pop-up window The border of a link annotation If the annotation does not specify an explicit color, black color is returned.
ColorPt pdftron::PDF::Annot::GetColorAsRGB ( ) const

Gets an annotation's color in RGB color space.

Returns
A ColorPt object containing an array of three numbers in the range 0.0 to 1.0, representing an RGB colour used for the following purposes:
  • The background of the annotation's icon when closed
  • The title bar of the annotation's pop-up window
  • The border of a link annotation

If the annotation does not specify an explicit color, a default color is returned. Text annotations return 'default yellow;' all others return black.

int pdftron::PDF::Annot::GetColorCompNum ( ) const

Returns the color space the annotation's color is represented in.

Returns
An integer that is either 1(for DeviceGray), 3(DeviceRGB), or 4(DeviceCMYK). If the annotation has no color, i.e. is transparent, 0 will be returned.
UString pdftron::PDF::Annot::GetContents ( ) const

Extract the content of this annotation. (Optional).

Returns
A unicode string object with the text that is associated with this annotation. This is the text that annotation displays on user interaction, if the annotation type supports it.
UString pdftron::PDF::Annot::GetCustomData ( const UString key) const

Returns custom data associated with the given key.

Parameters
keyThe key for which to retrieve the associated data.
Returns
the custom data string. If no data is available an empty string is returned.
Date pdftron::PDF::Annot::GetDate ( ) const

Gets an annotation's last modified date.

Returns
The annotation's last modified time and date. If the annotation has no associated date structure, the returned date is not valid (date.IsValid() returns false). Corresponds to the "M" entry of the annotation dictionary.
bool pdftron::PDF::Annot::GetFlag ( Flag  flag) const
Returns
The value of given Flag
Parameters
flagThe Flag property to query.
ptrdiff_t pdftron::PDF::Annot::GetHandleInternal ( )
SDF::Obj pdftron::PDF::Annot::GetOptionalContent ( ) const

Returns optional content associated with this annotation.

Returns
A SDF object corresponding to the group of optional properties.
Note
The return value is an Optional Content Group (OCG) or Optional Content Membership Dictionary (PDF::OCG::OCMD) specifying the optional content properties for the annotation. Before the annotation is drawn, its visibility shall be determined based on this entry as well as the annotation flags specified in the Flag entry. If it is determined to be invisible, the annotation shall be skipped, as if it were not in the document.
Page pdftron::PDF::Annot::GetPage ( ) const

Gets the page the annotation is associated with.

Returns
A Page object or null page object if the page reference is not available. The page object returned is an indirect reference to the page object with which this annotation is associated. This entry shall be present in screen annotations associated with rendition actions.

Optional. PDF 1.3 PDF 1.4 PDF 1.5 not used in FDF files.

Rect pdftron::PDF::Annot::GetRect ( ) const
Returns
Annotation's bounding rectangle, specified in user space coordinates.

The meaning of the rectangle depends on the annotation type. For Link and RubberStamp annotations, the rectangle specifies the area containing the hyperlink area or stamp. For Note annotations, the rectangle is describing the popup window when it's opened. When it's closed, the icon is positioned at lower left corner.

int pdftron::PDF::Annot::GetRotation ( ) const

Returns the rotation value of the annotation. The Rotation specifies the number of degrees by which the annotation shall be rotated counterclockwise relative to the page. The value shall be a multiple of 90.

Returns
An integer representing the rotation value of the annotation.
Note
This property is part of the appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
SDF::Obj pdftron::PDF::Annot::GetSDFObj ( ) const
Returns
The underlying SDF/Cos object.
int pdftron::PDF::Annot::GetStructParent ( ) const

Returns the struct parent of an annotation. (Required if the annotation is a structural content item; PDF 1.3)

Returns
An integer which is the integer key of the annotation's entry in the structural parent tree.
Note
The StructParent is the integer key of the annotation's entry in the structural parent tree.
SDF::Obj pdftron::PDF::Annot::GetTriggerAction ( Annot::ActionTriggerEvent  trigger)

Get the Action associated with the selected Annot Trigger event.

Parameters
triggerthe type of trigger event to get
Returns
the Action Obj if present, otherwise NULL
Type pdftron::PDF::Annot::GetType ( ) const
Returns
The type of this annotation. Corresponds to the "Subtype" entry of annotation dictionary, as per PDF Reference Manual section 12.5.2
SDF::Obj pdftron::PDF::Annot::GetUniqueID ( ) const
Returns
The unique identifier for this annotation, or NULL if the identifier is not available. The returned value is a String object and is the value of the "NM" field, which was added as an optional attribute in PDF 1.4.
Rect pdftron::PDF::Annot::GetVisibleContentBox ( ) const

It is possible during viewing that GetRect does not return the most accurate bounding box of what is actually rendered. This method calculates the bounding box, rather than relying on what is specified in the PDF document. The bounding box is defined as the smallest rectangle that includes all the visible content on the annotation.

Returns
the bounding box for this annotation. The dimensions are specified in user space coordinates.
bool pdftron::PDF::Annot::IsMarkup ( ) const

Return true if this annotation is classified as a markup annotation.

Returns
boolean value, true if this annotation is classified as a markup annotation.
bool pdftron::PDF::Annot::IsValid ( ) const
Returns
True if this is a valid (non-null) annotation, false otherwise. If the function returns false the underlying SDF/Cos object is null or is not valid and the annotation object should be treated as a null object.
Annot& pdftron::PDF::Annot::operator= ( const Annot d)

Assignment operator

bool pdftron::PDF::Annot::operator== ( const Annot d)

Compares two annotations for equality. The comparison will return true only if both annotations share the same underlying SDF/Cos object.

Parameters
dAnnotation to compare to
void pdftron::PDF::Annot::RefreshAppearance ( )

Regenerates the appearance stream for the annotation. This method can be used to auto-generate the annotation appearance after creating or modifying the annotation without providing an explicit appearance or setting the "NeedAppearances" flag in the AcroForm dictionary.

Note
If this annotation contains text, and has been added to a rotated page, the text in the annotation may be rotated. If RefreshAppearance is called after the annotation is added to a rotated page, then any text will be rotated in the opposite direction of the page rotation. If this method is called before the annotation is added to any rotated page, then no counter rotation will be applied. If you wish to call RefreshAppearance on an annotation already added to a rotated page, but you don't want the text to be rotated, you can do one of the following; temporarily un-rotate the page, or, temporarily remove the "Rotate" object from the annotation. To support users adding text annotations while using a PDF viewer, you can also add any viewer rotation to the annotations Rotate object, to have text always rotated correctly, from the users perspective.
void pdftron::PDF::Annot::RefreshAppearance ( const RefreshOptions options)

A version of RefreshAppearance allowing custom options to make slight tweaks in behaviour.

Parameters
optionsThe RefreshOptions.
void pdftron::PDF::Annot::RemoveAppearance ( AnnotationState  annot_state = e_normal,
const char *  app_state = 0 
)

Removes the annotation's appearance for the given combination of annotation and appearance states.

Parameters
annot_statethe annotation's appearance state, which selects the applicable appearance stream from the appearance sub-dictionary. An annotation can define as many as three separate appearances: The normal, rollover, and down appearance.
app_stateis an optional parameter specifying the appearance state (e.g. "Off", "On", etc) under which the new appearance should be stored. If appearance_state is NULL, the annotation will have only one annotation state.
void pdftron::PDF::Annot::Resize ( const Rect newrect)

Scales the geometry of the annotation so that its appearance would now fit a new rectangle on the page, in user units. Users still have to call RefreshAppearance() later if they want a corresponding appearance stream to be generated for the new rectangle. The main reason for not combining the two operations together is to be able to resize annotations that do not have an appearance stream.

Parameters
newrectA reference to the new rectangle to which this annotation has to be resized.
void pdftron::PDF::Annot::SetActiveAppearanceState ( const char *  astate)

Sets the annotation's active appearance state. (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2)

Parameters
astateCharacter string representing the name of the active appearance state. The string used to select the annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary.
void pdftron::PDF::Annot::SetAppearance ( SDF::Obj  app_stream,
AnnotationState  annot_state = e_normal,
const char *  app_state = 0 
)

Sets the annotation's appearance for the given combination of annotation and appearance states. (Optional; PDF 1.2)

Parameters
app_streama content stream defining the new appearance.
annot_statethe annotation's appearance state, which selects the applicable appearance stream from the appearance sub-dictionary. An annotation can define as many as three separate appearances: The normal, rollover, and down appearance.
app_stateis an optional parameter specifying the appearance state (e.g. "Off", "On", etc) under which the new appearance should be stored. If appearance_state is NULL, the annotation will have only one annotation state.
void pdftron::PDF::Annot::SetBorderStyle ( const BorderStyle bs,
bool  oldStyleOnly = false 
)

Sets the border style for the annotation.

Parameters
bsNew border style for this annotation.
oldStyleOnlyPDF manual specifies two ways to add border information to an annotation object, either through an array named 'Border' (PDF 1.0), or a dictionary called 'BS' (PDF 1.2) the latter taking precedence over the former. However, if you want to create a border with rounded corners, you can only do that using PDF 1.0 Border specification, in which case if you call SetBorderStyle() set the parameter oldStyleOnly to true. This parameter has a default value of false in the API and does not need to be used otherwise.
void pdftron::PDF::Annot::SetColor ( const ColorPt col,
int  numcomp = 3 
)

Sets an annotation's color. (Optional; PDF 1.1)

Parameters
colA ColorPt object in RGB or Gray or CMYK color space representing the annotation's color. The ColorPt contains an array of numbers in the range 0.0 to 1.0, representing a color used for the following purposes: The background of the annotation's icon when closed The title bar of the annotation's pop-up window The border of a link annotation

The number of array elements determines the color space in which the color shall be defined: 0 No color; transparent 1 DeviceGray 3 DeviceRGB 4 DeviceCMYK

Parameters
numcomp- The number of color components used to represent the color (i.e. 1, 3, 4).
void pdftron::PDF::Annot::SetContents ( const UString contents)

Sets the content of this annotation. (Optional).

Parameters
contentsA reference to unicode string object with the text that will be associated with this annotation. This is the text that annotation displays on user interaction, if the annotation type supports it.
void pdftron::PDF::Annot::SetCustomData ( const UString key,
const UString value 
)

Sets the custom data associated with the specified key.

Parameters
keyThe key under which to store this custom data
valueThe custom data string to store
void pdftron::PDF::Annot::SetDate ( const Date date)

Sets an annotation's last modified date.

Parameters
dateThe annotation's last modified time and date. Corresponds to the "M" entry of the annotation dictionary.
void pdftron::PDF::Annot::SetFlag ( Flag  flag,
bool  value 
)

Sets the value of given Flag.

Parameters
flagThe Flag property to modify.
valueThe new value for the property.
void pdftron::PDF::Annot::SetOptionalContent ( SDF::Obj  content)

Associates optional content with this annotation. (Optional, PDF1.5).

Parameters
contentA pointer to an SDF object corresponding to the optional content, a PDF::OCG::Group or membership dictionary specifying the PDF::OCG::Group properties for the annotation. Before the annotation is drawn, its visibility shall be determined based on this entry as well as the annotation flags specified in the Flag entry . If it is determined to be invisible, the annotation shall be skipped, as if it were not in the document.
void pdftron::PDF::Annot::SetPage ( const Page page)

Sets the reference to a page the annotation is associated with. (Optional PDF 1.3; not used in FDF files)

Parameters
pageThe page object user wants the annotation to be associated with.
Note
The parameter should be an indirect reference to the page object with which this annotation is associated. This entry shall be present in screen annotations associated with rendition actions
void pdftron::PDF::Annot::SetRect ( const Rect pos)

Sets the size and location of an annotation on its page.

Parameters
posAnnotation's bounding rectangle, specified in user space coordinates.

The meaning of the rectangle depends on the annotation type. For Link and RubberStamp annotations, the rectangle specifies the area containing the hyperlink area or stamp. For Note annotations, the rectangle is describing the popup window when it's opened. When it's closed, the icon is positioned at lower left corner.

void pdftron::PDF::Annot::SetRotation ( int  angle)

Sets the rotation value of the annotation. The Rotation specifies the number of degrees by which the annotation shall be rotated counterclockwise relative to the page. The value shall be a multiple of 90. (Optional)

Parameters
angleAn integer representing the rotation value of the annotation.
Note
This property is part of the appearance characteristics dictionary, this dictionary that shall be used in constructing a dynamic appearance stream specifying the annotation's visual presentation on the page.
void pdftron::PDF::Annot::SetStructParent ( const int  parkeyval)

Sets the struct parent of an annotation. (Required if the annotation is a structural content item; PDF 1.3)

Parameters
parkeyvalAn integer which is the integer key of the annotation's entry in the structural parent tree.
Note
The StructParent is the integer key of the annotation's entry in the structural parent tree.
void pdftron::PDF::Annot::SetUniqueID ( const char *  id,
int  id_buf_sz = 0 
)

Sets the unique identifier for this annotation.

Parameters
idA buffer containing a unique identifier for this annotation.
id_buf_szThe size of 'id' buffer, or 0 if the string is NULL terminated.
Note
It is necessary to ensure that the unique ID generated is actually unique.

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