Loading...
Searching...
No Matches
pdftron::PDF::Annots::TextMarkup Class Reference

`#include <TextMarkup.h>`

Inheritance diagram for pdftron::PDF::Annots::TextMarkup:

## Public Member Functions
| TextMarkup (SDF::Obj d)
| TextMarkup (const Annot &ann)
int | GetQuadPointCount ()
QuadPoint | GetQuadPoint (int idx) const
void | SetQuadPoint (int idx, const QuadPoint &qp)
Public Member Functions inherited from pdftron::PDF::Annots::Markup
| Markup (SDF::Obj d=0)
| Markup (const Annot &ann)
UString | GetTitle ()
void | SetTitle (const UString &title)
void | SetTitle (const char *title)
Popup | GetPopup () const
void | SetPopup (const Popup &ppup)
double | GetOpacity () const
void | SetOpacity (double op)
UString | GetSubject () const
void | SetSubject (const UString &contents)
Date | GetCreationDates () const
void | SetCreationDates (const Date &dt)
BorderEffect | GetBorderEffect () const
void | SetBorderEffect (BorderEffect effect=e_None)
double | GetBorderEffectIntensity () const
void | SetBorderEffectIntensity (double intensity=0)
ColorPt | GetInteriorColor () const
int | GetInteriorColorCompNum () const
void | SetInteriorColor (const ColorPt &c, int CompNum)
Rect | GetContentRect () const
void | SetContentRect (const Rect &cr)
Rect | GetPadding () const
void | SetPadding (const Rect &rd)
void | SetPadding (double x)
void | RotateAppearance (double angle)
Public Member Functions inherited from pdftron::PDF::Annot
| Annot (SDF::Obj d=0)
| Annot (const Annot &d)
Annot & | operator= (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 ()

## Additional Inherited Members
Public Types inherited from pdftron::PDF::Annots::Markup
enum | BorderEffect { e_None , e_Cloudy }
Public Types inherited from pdftron::PDF::Annot
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
Static Public Member Functions inherited from pdftron::PDF::Annot
static Annot | Create (SDF::SDFDoc &doc, Type type, const Rect &pos)
static Annot * | CreateInternal (ptrdiff_t impl)

## Detailed Description

A TextMarkup is a base class for highlight, underline, strikeout, and squiggly annotations.

Definition at line 19 of file TextMarkup.h.

## Constructor & Destructor Documentation

## ◆ TextMarkup() [1/2]

pdftron::PDF::Annots::TextMarkup::TextMarkup | ( | SDF::Obj | d | ) |

Creates a TextMarkup annotation and initializes it using given Cos/SDF object.

Parameters

  d | The 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.

## ◆ TextMarkup() [2/2]

pdftron::PDF::Annots::TextMarkup::TextMarkup | ( | const Annot & | ann | ) |
| inline

Creates a TextMarkup annotation and initializes it using given annotation object.

Parameters

  ann | Annot object used to initialize the TextMarkup annotation.

Note
  The constructor does not copy any data, but is instead the logical equivalent of a type cast.

Definition at line 36 of file TextMarkup.h.

## Member Function Documentation

## ◆ GetQuadPoint()

QuadPoint pdftron::PDF::Annots::TextMarkup::GetQuadPoint | ( | int | idx | ) | const

Returns the QuadPoint located at a certain index of the QuadPoint array. (PDF 1.6)

Parameters

  idx | The index where the QuadPoint is located. The index starts at zero and must be less than return value of GetQuadPointCount().

Returns
  The QuadPoint located at a certain index of the QuadPoint array of the TextMarkup annotation.

Note
  QuadPoints specify the coordinates of quadrilaterals in default user space. Each quadrilateral encompasses a word or group of contiguous words in the text underlying the annotation. The four points(p1, p2, p3, p4) of a QuadPoint specify the quadrilateral's four vertices in counterclockwise order. The text needs to be oriented with respect to the edge connecting points (p1) and (p2). The annotation dictionary's Appearance entry, if present, takes precedence over QuadPoints.

## ◆ GetQuadPointCount()

int pdftron::PDF::Annots::TextMarkup::GetQuadPointCount | ( |  | ) |

Returns the number of QuadPoints in the QuadPoints array of the TextMarkup annotation (PDF 1.6)

Returns
  The number of QuadPoints.

Note
  QuadPoints specify the coordinates of quadrilaterals in default user space. Each quadrilateral encompasses a word or group of contiguous words in the text underlying the annotation. The four points(p1, p2, p3, p4) of a QuadPoint specify the quadrilateral's four vertices in counterclockwise order. The text needs to be oriented with respect to the edge connecting points (p1) and (p2). The annotation dictionary's Appearance entry, if present, takes precedence over QuadPoints.

## ◆ SetQuadPoint()

void pdftron::PDF::Annots::TextMarkup::SetQuadPoint | ( | int | idx,
|  | const QuadPoint & | qp )

Sets the QuadPoint to be located at a certain index of the QuadPoint array. (Optional; PDF 1.6 )

Parameters

  idx | The index where the QuadPoint is to be located (the index is counted from 0).
  qp | The QuadPoint to be located at a certain index of the QuadPoint array of the TextMarkup annotation.

Attention
  To make this QuadPoint compatible with Adobe Acrobat|Reader, you can use either clockwise or counterclockwise order, but the points p3 and p4 must be swapped. This is because those readers do not follow the PDF specification for TextMarkup QuadPoints.

Note
  An array of n QuadPoints specifying the coordinates of n quadrilaterals in default user space. Each quadrilateral shall encompasses a word or group of contiguous words in the text underlying the annotation. The coordinates for each quadrilateral shall be given in the order p1, p2, p3, p4 specifying the quadrilateral's four vertices in counterclockwise order. The text shall be oriented with respect to the edge connecting points (p1) and (p2). The annotation dictionary's Appearance(AP) entry, if present, shall take precedence over QuadPoints.

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

- PDF/Annots/TextMarkup.h