Foxit::PDF::Annotations::Link Class Reference

Class to represent link annotation. More...

Inherits Foxit::PDF::Annotations::IAnnot.

Public Member Functions

virtual Boolean IsMarkup ()
 Check if current annotation is a markup annotation. More...
 
virtual AnnotType GetType ()
 Get the type of current annotation. More...
 
virtual String^ GetContents ()
 Get the contents data. More...
 
virtual void SetContents (String^ content)
 Set the contents data. More...
 
virtual DateTimeGetModifiedTime ()
 Get the last modification time. More...
 
virtual void SetModifiedTime (DateTime^ modifiedTime)
 Set the last modification time. More...
 
virtual UInt32 GetFlags ()
 Get annotation flags. More...
 
virtual void SetFlags (UInt32 flags)
 Set annotation flags. More...
 
virtual String^ GetName ()
 Get annotation name string. More...
 
virtual void SetName (String^ name)
 Get annotation name string. More...
 
virtual RectFGetRect ()
 Get rectangle value. More...
 
virtual Boolean Move (RectF^ rect)
 Move current annotation to a new position specified by a rectangle. More...
 
virtual BorderInfoGetBorderInfo ()
 Get border information. More...
 
virtual void SetBorderInfo (BorderInfo^ border)
 Set border information. More...
 
List< PointF^ >^ GetQuadPoints ()
 Get quadrilaterals points. More...
 
void SetQuadPoints (const List< PointF^ >^quadPoints)
 Set quadrilaterals points. More...
 
HighlightingMode GetHighlightingMode ()
 Get highlighting mode. More...
 
void SetHighlightingMode (HighlightingMode highlightingMode)
 Set highlighting mode. More...
 
Int32 CountActions (ActionTrigger trigger)
 Count actions with specific action trigger. More...
 
Foxit::PDF::ActionGetAction (ActionTrigger trigger, Int32 index)
 Get the data of an action specified by index, with specific action trigger. More...
 
void SetAction (ActionTrigger trigger, Int32 index, Foxit::PDF::Action^ action)
 Set action data to an action specified by index, with specific action trigger. More...
 
Boolean InsertAction (ActionTrigger trigger, Int32 index, Foxit::PDF::Action^ action)
 Insert a new action, with specific action trigger. More...
 
Boolean RemoveAction (ActionTrigger trigger, Int32 index)
 Remove an action specified by index, with specific action trigger. More...
 
Boolean RemoveAllActions (ActionTrigger trigger)
 Remove all actions, with specific action trigger. More...
 
Boolean ResetApppearanceStream ()
 Reset(regenerate) the appearance stream. More...
 

Additional Inherited Members

- Properties inherited from Foxit::PDF::Annotations::IAnnot
Int64 pointer
 Pointer to a handle of PDF annotation object. This pointer is not useful outside this SDK. The application should not access the pointer to the handle of the PDF annotation object directly.
 

Detailed Description

Class to represent link annotation.

A link annotation represents either a hypertext link to a destination elsewhere in the document or an action to be performed.

Member Function Documentation

Int32 Foxit::PDF::Annotations::Link::CountActions ( ActionTrigger  trigger)

Count actions with specific action trigger.

Parameters
[in]triggerThe trigger of action. Please refer to enumeration Annotations::ActionTrigger and this should be one of its values.
Returns
The count of actions with specific action trigger.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::Param means parameter trigger is invalid.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.
Foxit::PDF::Action ^ Foxit::PDF::Annotations::Link::GetAction ( ActionTrigger  trigger,
Int32  index 
)

Get the data of an action specified by index, with specific action trigger.

Parameters
[in]triggerThe trigger of action. Please refer to enumeration Annotations::ActionTrigger and this should be one of its values.
[in]indexIndex of the action to be got. Range: 0 to (actionCount-1). actionCount is returned by function Link::CountActions with same parameter trigger.
Returns
An PDF::Action object that receives the data of specified action. If there is any error, this function will return nullptr.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::Param means parameter trigger is invalid.
ErrorCode::NotFound means parameter index is out of range.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.
virtual BorderInfo ^ Foxit::PDF::Annotations::Link::GetBorderInfo ( )
virtual

Get border information.

Returns
A Annotations::BorderInfo object that receives the border information value. If there is any error, this function will return nullptr.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::NotFound means no border property can be found.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.

Implements Foxit::PDF::Annotations::IAnnot.

virtual String ^ Foxit::PDF::Annotations::Link::GetContents ( )
virtual

Get the contents data.

Contents data is the text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. In either case, this text is useful when extracting the document's contents in support of accessibility to users with disabilities or for other purposes

Returns
A String object that receives the contents data. If there is any error, this function will return nullptr.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::NotFound means no content data can be found.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.

Implements Foxit::PDF::Annotations::IAnnot.

virtual UInt32 Foxit::PDF::Annotations::Link::GetFlags ( )
virtual

Get annotation flags.

Returns
Value of flags. Please refer to enumeration Annotations::Flags and this would be one or combination of its values.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::NotFound means no flags property can be found.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.

Implements Foxit::PDF::Annotations::IAnnot.

HighlightingMode Foxit::PDF::Annotations::Link::GetHighlightingMode ( )

Get highlighting mode.

Returns
Highlighting mode value. Please refer to enumeration Annotations::HighlightingMode and this would be one of its values.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::NotFound means no highlighting mode property can be found.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.
virtual DateTime ^ Foxit::PDF::Annotations::Link::GetModifiedTime ( )
virtual

Get the last modification time.

Returns
A Foxit::DateTime object that receives the last modification time. If there is any error, this function will return nullptr.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::NotFound means no modified time data can be found.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.

Implements Foxit::PDF::Annotations::IAnnot.

virtual String ^ Foxit::PDF::Annotations::Link::GetName ( )
virtual

Get annotation name string.

The annotation name, a text string uniquely identifying it among all the annotations on its page.

Returns
A String object that receives the name string. If there is any error, this function will return nullptr.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::NotFound means no name property can be found.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.

Implements Foxit::PDF::Annotations::IAnnot.

List<PointF^> ^ Foxit::PDF::Annotations::Link::GetQuadPoints ( )

Get quadrilaterals points.

The order of points of a quadrilateral should be as follows:

                (x1, y1)           (x2, y2)
                        ----------------
                        |              |
                        |              |
                        ----------------
                (x3, y3)           (x4, y4)
                
Returns
A point array that receives all the quadrilaterals points. The count of this array would be above 0 and a multiple of 4. If the property cannot be found or there is any error, this function will return nullptr.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::NotFound means no quadrilaterals points property can be found.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.
virtual RectF ^ Foxit::PDF::Annotations::Link::GetRect ( )
virtual

Get rectangle value.

Returns
A Foxit::RectF object that receives the rectangle value. If there is any error, this function will return nullptr.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::NotFound means no rectangle property can be found.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.

Implements Foxit::PDF::Annotations::IAnnot.

virtual AnnotType Foxit::PDF::Annotations::Link::GetType ( )
virtual

Get the type of current annotation.

Returns
Annotation type. Please refer to enumeration Annotations::AnnotType and this would be one of its values.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.

Implements Foxit::PDF::Annotations::IAnnot.

Boolean Foxit::PDF::Annotations::Link::InsertAction ( ActionTrigger  trigger,
Int32  index,
Foxit::PDF::Action action 
)

Insert a new action, with specific action trigger.

Parameters
[in]triggerThe trigger of action. Please refer to enumeration Annotations::ActionTrigger and this should be one of its values.
[in]indexIndex of the action to be got. Range: 0 to (actionCount-1). actionCount is returned by function Link::CountActions with same parameter trigger.
If index is out of range, the new action will be inserted to the last.
[in]actionA PDF::Action object that specifies the new action data to be inserted.
Returns
A boolean value: true means success, while false means failure.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::Param means parameter trigger is invalid or parameter action is nullptr or invalid.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.
virtual Boolean Foxit::PDF::Annotations::Link::IsMarkup ( )
virtual

Check if current annotation is a markup annotation.

Returns
A boolean value: true means current annotation is a markup annotation, while false means current annotation is not a markup annotation.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.

Implements Foxit::PDF::Annotations::IAnnot.

virtual Boolean Foxit::PDF::Annotations::Link::Move ( RectF rect)
virtual

Move current annotation to a new position specified by a rectangle.

To move an annotation is to reset its rectangle.

Parameters
[in]rectA Foxit::RectF object that specifies the new position. The rect should be "normalized" for PDF page coordination: left is always smaller than right, and bottom is always smaller than top.
Returns
A boolean value: true means success, while false means failure.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::Param means parameter rect is invalid.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.

Implements Foxit::PDF::Annotations::IAnnot.

Boolean Foxit::PDF::Annotations::Link::RemoveAction ( ActionTrigger  trigger,
Int32  index 
)

Remove an action specified by index, with specific action trigger.

Parameters
[in]triggerThe trigger of action. Please refer to enumeration Annotations::ActionTrigger and this should be one of its values.
[in]indexIndex of the action to be got. Range: 0 to (actionCount-1). actionCount is returned by function Link::CountActions with same parameter trigger.
Returns
A boolean value: true means success, while false means failure.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::Param means parameter trigger is invalid.
ErrorCode::NotFound means parameter index is out of range.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.
Boolean Foxit::PDF::Annotations::Link::RemoveAllActions ( ActionTrigger  trigger)

Remove all actions, with specific action trigger.

Parameters
[in]triggerThe trigger of action. Please refer to enumeration Annotations::ActionTrigger and this should be one of its values.
Returns
A boolean value: true means success, while false means failure.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::Param means parameter trigger is invalid.
ErrorCode::NotFound means no trigger actions can be found.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.
Boolean Foxit::PDF::Annotations::Link::ResetApppearanceStream ( )

Reset(regenerate) the appearance stream.

Returns
A boolean value: true means success, while false means error.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::UnknownState means some necessary property of current annotation does not be set correctly.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.
void Foxit::PDF::Annotations::Link::SetAction ( ActionTrigger  trigger,
Int32  index,
Foxit::PDF::Action action 
)

Set action data to an action specified by index, with specific action trigger.

Parameters
[in]triggerThe trigger of action. Please refer to enumeration Annotations::ActionTrigger and this should be one of its values.
[in]indexIndex of the action to be got. Range: 0 to (actionCount-1). actionCount is returned by function Link::CountActions with same parameter trigger.
[in]actionA PDF::Action object that specifies the new action data to be set.
Returns
None.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::Param means parameter trigger is invalid or parameter action is nullptr or invalid.
ErrorCode::NotFound means parameter index is out of range.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.
virtual void Foxit::PDF::Annotations::Link::SetBorderInfo ( BorderInfo border)
virtual

Set border information.

Parameters
[in]borderAn Annotations::BorderInfo object that specifies the new border information to be set. Please refer to comment of Annotations::BorderInfo for more details.
Returns
None.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::Param means parameter border is nullptr or some properties of border is invalid.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.

Implements Foxit::PDF::Annotations::IAnnot.

virtual void Foxit::PDF::Annotations::Link::SetContents ( String^  content)
virtual

Set the contents data.

Contents data is the text to be displayed for the annotation or, if this type of annotation does not display text, an alternate description of the annotation's contents in human-readable form. In either case, this text is useful when extracting the document's contents in support of accessibility to users with disabilities or for other purposes.
Please ensure that a free text annotation has already been set the default appearance property for keeping its contents data useful.

Parameters
[in]contentA String object that specifies the new contents data to be set. It can be nullptr or empty.
Returns
None.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.

Implements Foxit::PDF::Annotations::IAnnot.

virtual void Foxit::PDF::Annotations::Link::SetFlags ( UInt32  flags)
virtual

Set annotation flags.

Parameters
[in]flagsValue of flags. Please refer to enumeration Annotations::Flags and this can be one or combination of its values.
Returns
None.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.

Implements Foxit::PDF::Annotations::IAnnot.

void Foxit::PDF::Annotations::Link::SetHighlightingMode ( HighlightingMode  highlightingMode)

Set highlighting mode.

Parameters
[in]highlightingModeNew highlighting mode value. Please refer to enumeration Annotations::HighlightingMode and this should be one of its values.
Returns
None.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::Param means parameter highlightingMode is invalid.
ErrorCode::Unsupported means parameter highlightingMode is HighlightingMode::Toggle.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.
virtual void Foxit::PDF::Annotations::Link::SetModifiedTime ( DateTime modifiedTime)
virtual

Set the last modification time.

Parameters
[in]modifiedTimeA Foxit::DateTime object that specifies the new last modification time data to be set. It should be valid and should not be nullptr.
Returns
None.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::Param means parameter modifiedTime is nullptr or invalid.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.

Implements Foxit::PDF::Annotations::IAnnot.

virtual void Foxit::PDF::Annotations::Link::SetName ( String^  name)
virtual

Get annotation name string.

The annotation name, a text string uniquely identifying it among all the annotations on its page.

Parameters
[in]nameA String object that specifies the new name string. This can be nullptr or empty.
Returns
None.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.

Implements Foxit::PDF::Annotations::IAnnot.

void Foxit::PDF::Annotations::Link::SetQuadPoints ( const List< PointF^ >^  quadPoints)

Set quadrilaterals points.

The order of points of a quadrilateral should be as follows:

                (x1, y1)           (x2, y2)
                        ----------------
                        |              |
                        |              |
                        ----------------
                (x3, y3)           (x4, y4)
                
Parameters
[in]quadPointsA point array that specifies the new quadrilaterals points. The count of this array should be above 0 and a multiple of 4.
Returns
None.
Call function Library::GetLastError after this function returns, to get the error code.
ErrorCode::Success means success.
ErrorCode::Param means parameter quadPoints is invalid.
ErrorCode::OutOfMemory means there is no enough memory or the memory access is wrong.
ErrorCode::Error means the function fails because of any other reasons.
For more error code values, please refer to enumeration Foxit::ErrorCode.

Foxit Corporation