Foxit PDF SDK
foxit::pdf::actions::EmbeddedGotoTarget Class Reference
Inheritance diagram for foxit::pdf::actions::EmbeddedGotoTarget:
foxit::Base

Public Member Functions

 EmbeddedGotoTarget (const PDFDoc &document)
 Constructor, with PDF document. More...
 
 EmbeddedGotoTarget (const foxit::pdf::PDFDoc &document, foxit::pdf::objects::PDFDictionary *target_object)
 Constructor, with PDF dictionary. More...
 
 EmbeddedGotoTarget (const EmbeddedGotoTarget &action)
 Constructor, with another embedded goto target object. More...
 
 ~EmbeddedGotoTarget ()
 Destructor.
 
WString GetAttachedFileName ()
 Get the embedded file name, which is used in "EmbeddedFile" name tree of current target file. More...
 
objects::PDFDictionaryGetDict () const
 Get PDF dictionary of current object. More...
 
int GetFileAttachmentAnnotIndex ()
 Get the annotation index which specifies a file attachment annotation in a specified page. More...
 
int GetPageIndex ()
 Get the page index which specifies the page that contains the target file attachment annotation. More...
 
String GetRelationship ()
 Get relationship between current target object and the object that current target object belongs to. More...
 
EmbeddedGotoTarget GetTarget ()
 Get the target which specifies additional path information to the target document. More...
 
bool IsEmpty () const
 Check whether current object is empty or not. More...
 
bool operator != (const EmbeddedGotoTarget &other) const
 Not equal operator. More...
 
EmbeddedGotoTargetoperator= (const EmbeddedGotoTarget &other)
 Assign operator. More...
 
bool operator== (const EmbeddedGotoTarget &other) const
 Equal operator. More...
 
void SetAttachedFileName (const WString &embed_file_name)
 Set the embedded file name, which is used in "EmbeddedFile" name tree of current target file. More...
 
void SetFileAttachmentAnnotIndex (int annot_index)
 Set the annotation index which specifies a file attachment annotation in a specified page. More...
 
void SetPageIndex (int page_index)
 Set the page index which specifies the page that contains the target file attachment annotation. More...
 
void SetRelationship (const String &relationship)
 Set relationship between current target object and the object that current target object belongs to. More...
 
void SetTarget (const EmbeddedGotoTarget &target)
 Set the target which specifies additional path information to the target document. More...
 
- Public Member Functions inherited from foxit::Base
FS_HANDLE Handle () const
 Get the handle of current object. More...
 

Detailed Description

The target of an embedded go-to action is the document in which the destination lives.

See also
EmbeddedGotoAction

Constructor & Destructor Documentation

◆ EmbeddedGotoTarget() [1/3]

foxit::pdf::actions::EmbeddedGotoTarget::EmbeddedGotoTarget ( const PDFDoc document)
explicit

Constructor, with PDF document.

This constructor is to construct a new embedded goto target object (without any data).

Parameters
[in]documentA valid PDF document object.

◆ EmbeddedGotoTarget() [2/3]

foxit::pdf::actions::EmbeddedGotoTarget::EmbeddedGotoTarget ( const foxit::pdf::PDFDoc document,
foxit::pdf::objects::PDFDictionary target_object 
)

Constructor, with PDF dictionary.

Parameters
[in]documentA valid PDF document object.
[in]target_objectA PDF dictionary that represents the embedded goto target data.

◆ EmbeddedGotoTarget() [3/3]

foxit::pdf::actions::EmbeddedGotoTarget::EmbeddedGotoTarget ( const EmbeddedGotoTarget action)

Constructor, with another embedded goto target object.

Parameters
[in]actionAnother embedded goto target object.

Member Function Documentation

◆ GetAttachedFileName()

WString foxit::pdf::actions::EmbeddedGotoTarget::GetAttachedFileName ( )

Get the embedded file name, which is used in "EmbeddedFile" name tree of current target file.

This is useful only when relationship is "C". If this property is a valid string, that means the target file is an embedded file defined in "EmbeddedFiles" name tree.

Returns
Embedded file name.

◆ GetDict()

objects::PDFDictionary* foxit::pdf::actions::EmbeddedGotoTarget::GetDict ( ) const

Get PDF dictionary of current object.

Returns
The PDF dictionary.If there is any error, this function will return NULL.

◆ GetFileAttachmentAnnotIndex()

int foxit::pdf::actions::EmbeddedGotoTarget::GetFileAttachmentAnnotIndex ( )

Get the annotation index which specifies a file attachment annotation in a specified page.

This is useful only when relationship is "C". If this property exists, that means the target file is related to a file attachment annotation, and this property just specifies the file attachment annotation in the specified page. Function EmbeddedGotoTarget::GetPageIndex can be used to get the page index specifying the page that contains the target file attachment annotation.

Returns
Annotation index which specifies a file attachment annotation. Valid value would starts from 0. -1 means no such property.

◆ GetPageIndex()

int foxit::pdf::actions::EmbeddedGotoTarget::GetPageIndex ( )

Get the page index which specifies the page that contains the target file attachment annotation.

This is useful only when relationship is "C". If this property exists, that means the target file is related to a file attachment annotation. And this property just specifies the page which contains the file attachment annotation. Function EmbeddedGotoTarget::GetFileAttachmentAnnotIndex can be used to get the annotation index of the target file attachment annotation.

Returns
Page index. Valid value would starts from 0. -1 means no such property

◆ GetRelationship()

String foxit::pdf::actions::EmbeddedGotoTarget::GetRelationship ( )

Get relationship between current target object and the object that current target object belongs to.

The relationship is the relationship between current target object and the object that current target object belongs to. Currently, the relationship could be one of following:

  • "P": current target object is the parent of the object that current target object belongs to.
  • "C": current target object is the child of the object that current target object belongs to.
Returns
Relationship string.

◆ GetTarget()

EmbeddedGotoTarget foxit::pdf::actions::EmbeddedGotoTarget::GetTarget ( )

Get the target which specifies additional path information to the target document.

Returns
An embedded goto target object. If the return value of function EmbeddedGotoTarget::IsEmpty for the returned embedded goto target object is true, that means current target object represents the final target file.

◆ IsEmpty()

bool foxit::pdf::actions::EmbeddedGotoTarget::IsEmpty ( ) const

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
true means current object is empty, while false means not.

◆ operator !=()

bool foxit::pdf::actions::EmbeddedGotoTarget::operator != ( const EmbeddedGotoTarget other) const

Not equal operator.

Parameters
[in]otherAnother embedded goto target object. This function will check if current object is not equal to this one.
Returns
true means not equal, while false means equal.

◆ operator=()

EmbeddedGotoTarget& foxit::pdf::actions::EmbeddedGotoTarget::operator= ( const EmbeddedGotoTarget other)

Assign operator.

Parameters
[in]otherAnother embedded goto target object, whose value would be assigned to current object.
Returns
Reference to current object itself.

◆ operator==()

bool foxit::pdf::actions::EmbeddedGotoTarget::operator== ( const EmbeddedGotoTarget other) const

Equal operator.

Parameters
[in]otherAnother embedded goto target object. This function will check if current object is equal to this one.
Returns
true means equal, while false means not equal.

◆ SetAttachedFileName()

void foxit::pdf::actions::EmbeddedGotoTarget::SetAttachedFileName ( const WString embed_file_name)

Set the embedded file name, which is used in "EmbeddedFile" name tree of current target file.

This is useful only when relationship is "C". If this property exists, that means the target file is an embedded file defined in "EmbeddedFiles" name tree.

Parameters
[in]embed_file_nameName for embedded file.
Returns
None.

◆ SetFileAttachmentAnnotIndex()

void foxit::pdf::actions::EmbeddedGotoTarget::SetFileAttachmentAnnotIndex ( int  annot_index)

Set the annotation index which specifies a file attachment annotation in a specified page.

This is useful only when relationship is "C". If this property exists, that means the target file is related to a file attachment annotation, and this property just specifies the file attachment annotation in the specified page. Function EmbeddedGotoTarget::SetPageIndex can be used to set the page index specifying the page that contains the target file attachment annotation.

Parameters
[in]annot_indexAnnotation index to specify the file attachment annotation. Valid range: from 0 to (count-1). count means the annotation count in that specified page.
Returns
None.

◆ SetPageIndex()

void foxit::pdf::actions::EmbeddedGotoTarget::SetPageIndex ( int  page_index)

Set the page index which specifies the page that contains the target file attachment annotation.

This is useful only when relationship is "C". If this property exists, that means the target file is related to a file attachment annotation, and this property just specifies the page which contains the file attachment annotation. Function EmbeddedGotoTarget::SetFileAttachmentAnnotIndex can be used to set the annotation index of the target file attachment annotation.

Parameters
[in]page_indexPage index to specify a page which contains the target file attachment annotation. Valid range: from 0 to (count-1). count means the page count of current target PDF file.
Returns
None.

◆ SetRelationship()

void foxit::pdf::actions::EmbeddedGotoTarget::SetRelationship ( const String relationship)

Set relationship between current target object and the object that current target object belongs to.

The relationship is the relationship between current target object and the object that current target object belongs to. Currently, the relationship could be one of following:

  • "P": current target object is the parent of the object that current target object belongs to.
  • "C": current target object is the child of the object that current target object belongs to.
Parameters
[in]relationshipIt should be one of following strings:"P", "C".
Returns
None.

◆ SetTarget()

void foxit::pdf::actions::EmbeddedGotoTarget::SetTarget ( const EmbeddedGotoTarget target)

Set the target which specifies additional path information to the target document.

Parameters
[in]targetAn embedded goto target object. If the return value of function EmbeddedGotoTarget::IsEmpty for the returned embedded goto target object is true, that means current target object represents the final target file.
Returns
None.