PDFix SDK  6.5.0
PdfAnnot Struct Referenceabstract

PdfAnnot class. More...

Inheritance diagram for PdfAnnot:
PdfLinkAnnot PdfMarkupAnnot PdfWidgetAnnot PdfTextAnnot PdfTextMarkupAnnot

Public Member Functions

virtual PdfAnnotSubtype GetSubtype ()=0
 Gets an annotation's subtype. More...
 
virtual PdfAnnotFlags GetFlags ()=0
 Gets an annotation's flags. More...
 
virtual void GetAppearance (PdfAnnotAppearance *appearance)=0
 Gets an annotation's appearance. More...
 
virtual PdsStreamGetAppearanceXObject (PdfAnnotAppearanceMode mode)=0
 Gets an annotation's appearance stream. More...
 
virtual bool SetAppearanceFromXObject (PdsStream *xobj, PdfAnnotAppearanceMode mode)=0
 Set an annotation's appearance from an XObject. More...
 
virtual void GetBBox (PdfRect *bbox)=0
 Gets the annotation bounding box. More...
 
virtual bool PointInAnnot (PdfPoint *point)=0
 
virtual bool RectInAnnot (PdfRect *rect)=0
 
virtual PdsObjectGetStructObject (bool struct_parent)=0
 
virtual PdsDictionaryGetObject ()=0
 Gets the annotation object dictionary. More...
 
virtual void NotifyWillChange (const wchar_t *key)=0
 Broadcasts a PDAnnotWillChange() notification. Clients must call this method before making any change to a custom annotation. More...
 
virtual void NotifyDidChange (const wchar_t *key, int err)=0
 Broadcasts a PDAnnotDidChange() notification. Clients must call this method after making any change to a custom annotation. More...
 
virtual bool IsValid ()=0
 

Detailed Description

PdfAnnot class.

An annotation associates an object such as a note, sound, or movie with a location on a page of a PDF document, or provides a way to interact with the user by means of the mouse and keyboard.

Member Function Documentation

◆ GetAppearance()

virtual void PdfAnnot::GetAppearance ( PdfAnnotAppearance appearance)
pure virtual

Gets an annotation's appearance.

Parameters
appearance(filled by method) Pointer to a PdfAnnotAppearance structure.

◆ GetAppearanceXObject()

virtual PdsStream* PdfAnnot::GetAppearanceXObject ( PdfAnnotAppearanceMode  mode)
pure virtual

Gets an annotation's appearance stream.

Parameters
modeThe apearance mode.
Returns
PdsStream object corresponding to the appearance stream.

◆ GetBBox()

virtual void PdfAnnot::GetBBox ( PdfRect bbox)
pure virtual

Gets the annotation bounding box.

Parameters
bbox(Filled by the method) Pointer to PdfRect structure to fill.

◆ GetFlags()

virtual PdfAnnotFlags PdfAnnot::GetFlags ( )
pure virtual

Gets an annotation's flags.

Returns
The flags, or 0 if the annotation does not have a flags key.

◆ GetObject()

virtual PdsDictionary* PdfAnnot::GetObject ( )
pure virtual

Gets the annotation object dictionary.

Returns
an annotation dictionary.

◆ GetStructObject()

virtual PdsObject* PdfAnnot::GetStructObject ( bool  struct_parent)
pure virtual

Gets the corresponding struct element object from the document structure tree. Iterates hierarchy of objects from the structure tree. If there is a reference to the current annotation, a structure element object with this reference is returned.

Parameters
struct_parentIf set to true, ParentTree is used in finding the structure element to which the annotation belongs.
Returns
PdsObject object corresponding to the found structure element, otherwise nullptr.
See also
PdsStructTree::AcquireStructElement

◆ GetSubtype()

virtual PdfAnnotSubtype PdfAnnot::GetSubtype ( )
pure virtual

Gets an annotation's subtype.

Returns
The PdfAnnotSubtype corresponding to the annot's subtype.

◆ IsValid()

virtual bool PdfAnnot::IsValid ( )
pure virtual

Tests whether an annotation is valid. This is intended only to ensure that the annotation has not been deleted, not to ensure that all necessary information is present and valid.

Returns
true if an PdfAnnot is a valid annotation object, false otherwise.

◆ NotifyDidChange()

virtual void PdfAnnot::NotifyDidChange ( const wchar_t *  key,
int  err 
)
pure virtual

Broadcasts a PDAnnotDidChange() notification. Clients must call this method after making any change to a custom annotation.

Parameters
keyThe name of the key in the annotation's dictionary that is changing.
errAn error code to pass to any method registered to receive the PDAnnotDidChange() notification. Pass zero if the annotation was changed successfully. Pass a nonzero value if an error occurred while changing the annotation.

◆ NotifyWillChange()

virtual void PdfAnnot::NotifyWillChange ( const wchar_t *  key)
pure virtual

Broadcasts a PDAnnotWillChange() notification. Clients must call this method before making any change to a custom annotation.

Parameters
keyThe name of the key in the annotation's dictionary that is changing.

◆ PointInAnnot()

virtual bool PdfAnnot::PointInAnnot ( PdfPoint point)
pure virtual

Tests whether the specified point is within an annotation. If an annotation consists of more quads, it tests each quad individually.

Parameters
pointThe point to test.
Returns
true if the point is within an annotation, false otherwise.

◆ RectInAnnot()

virtual bool PdfAnnot::RectInAnnot ( PdfRect rect)
pure virtual

Tests whether the specified rect is within an annotation. If an annotation consists of more quads, it tests each quad individually.

Parameters
rectThe rectangle to test.
Returns
true if the the whole rectangle is within an annotation, false otherwise.

◆ SetAppearanceFromXObject()

virtual bool PdfAnnot::SetAppearanceFromXObject ( PdsStream xobj,
PdfAnnotAppearanceMode  mode 
)
pure virtual

Set an annotation's appearance from an XObject.

Parameters
xobjPointer to a XObject.
Returns
true is the appearance was successfully set, false otherwise
See also
PdfDoc::CreateXObjectFromImage, PdsContent::ToObject