PdfAction class.
More...
#include <pdfix.h>
PdfAction class.
The PdfAction are tasks that pdf viewer performs when a user clicks on a link or a bookmark.
◆ CanCopy()
virtual bool PdfAction::CanCopy |
( |
| ) |
|
|
pure virtual |
Tests whether the data from an action object can be copied to a clipboard for pasting. If the action is part of an action chain, the method tests all actions in the chain, and returns true only if all actions in the chain can be copied.
- Returns
- true if the action object or all actions in the action chain can be copied, false otherwise.
◆ CanPaste()
virtual bool PdfAction::CanPaste |
( |
PdfDoc * |
dest_doc, |
|
|
void * |
data |
|
) |
| |
|
pure virtual |
Tests whether data from an action object that has been copied to a clipboard can be pasted into a destination document. It tests, for example, whether pasting is allowed by document permissions
- Parameters
-
dest_doc | The destination document. |
data | The clipboard data that will be pasted to the page. |
- Returns
- true if the action data can be pasted, false otherwise.
◆ Copy()
virtual void * PdfAction::Copy |
( |
| ) |
|
|
pure virtual |
◆ DestroyClipboardData()
virtual void PdfAction::DestroyClipboardData |
( |
void * |
data | ) |
|
|
pure virtual |
Destroys data that has been copied from an action object into a clipboard. Use this method when the clipboard data is no longer needed.
- Parameters
-
◆ GetChild()
virtual PdfAction * PdfAction::GetChild |
( |
int |
index | ) |
const |
|
pure virtual |
Gets the requested child action from a parent action.
- Parameters
-
index | The index of action object to obtain. |
- Returns
- Requested action.
- See also
- PdfAction::GetNumChildren
-
PdfAction::Release
◆ GetDestFile()
virtual int PdfAction::GetDestFile |
( |
wchar_t * |
buffer, |
|
|
int |
len |
|
) |
| const |
|
pure virtual |
Gets the string buffer from the action representing external resource. For URI action it's the uniform resource identifier (URI) typically a file that is the destination of a hypertext link. For Launch action it's a file specification of the application that shall be launched or the document that shall beopened or printed. For GoToE action it's a file specification of an external root document of the source.
- Parameters
-
buffer | (filled by method) If the buffer is null function returns required length of string |
len | Length of a buffer to be filled in. |
- Returns
- Number of characters written into buffer of required length.
◆ GetJavaScript()
virtual int PdfAction::GetJavaScript |
( |
wchar_t * |
buffer, |
|
|
int |
len |
|
) |
| const |
|
pure virtual |
Gets the string buffer from the JavaScript action.
- Parameters
-
buffer | (filled by method) If the buffer is null function returns required length of string |
len | Length of a buffer to be filled in. |
- Returns
- Number of characters written into buffer of required length.
◆ GetNumChildren()
virtual int PdfAction::GetNumChildren |
( |
| ) |
const |
|
pure virtual |
Gets the number of child actions in a parent action object.
- Returns
- The number of children.
- See also
- PdfAction::GetChild
◆ GetObject()
Gets the action object dictionary.
- Returns
- an action dictionary.
◆ GetSubtype()
Gets an action's subtype.
- Returns
- The PdfActionType corresponding to the action's subtype.
◆ GetViewDestination()
Gets the view destination of the GoTo, GoToR or GoToE action. The objects can bee represented by an array or a string object
- Returns
- the view destination.
◆ Paste()
Creates a new PdfAction in the destination document, using clipboard data generated by PdfAction::Copy. If the original PdfAction was an action chain, the entire action chain is recreated. The returned PdfAction is the first item in the chain. After successfully pasting the data, use PdfAction::DestroyClipboardData() to free the associated memory.
- Parameters
-
dest_doc | The page to which the action is pasted. |
- Returns
- A newly created action object associated with the specified document, containing the same data as the copied action.
- See also
- PdfAction::DestroyClipboardData
◆ RemoveChild()
virtual bool PdfAction::RemoveChild |
( |
int |
index | ) |
|
|
pure virtual |
Removes the specified child froma an action.
- Parameters
-
index | The index of the child. |
- Returns
- True if successfull, false otherwise.
◆ SetViewDestination()
Sets the view destination of the GoTo, GoToR or GoToE action. The objects can bee represented by an array or a string object
- Parameters
-
view_dest | The view destination. |
- Returns
- true if view destination was set, false otherwise.