Foxit PDF RDK

Public Member Functions | List of all members
OpenDocumentTask Class Reference

Represents a task for opening a document with specified settings and options. More...

Inheritance diagram for OpenDocumentTask:

## Public Member Functions
| constructor (settingData, openType, cb)
| Constructor for the OpenDocumentTask class. More...
| getDocument ()
| Retrieves the PDF document opened by the task. More...
| getXFADoc ()
| Retrieves the XFA document associated with the task. More...
| isDynamicXFA ()
| Checks if the document uses dynamic XFA. More...
Public Member Functions inherited from Task
| canCancel ()
| Checks if the task can be cancelled. More...
| cancel ()
| Cancels the task. Attempts to cancel the task if it is in a cancellable state.
| constructor ()
| Constructor for the Task class. Initializes a new instance of the Task.
| errorCode ()
| Gets the error code of the task. More...
| exeSuccess ()
| Checks if the task was executed successfully. More...
| extErrorCode ()
| Gets the extended error code of the task. More...
| finish ()
| Marks the task as finished. Completes the task and performs any necessary cleanup.
| getPriority ()
| Gets the current priority of the task. More...
| getStatus ()
| Gets the current status of the task. More...
| isCanceled ()
| Checks if the task has been cancelled. More...
| isModify ()
| Checks if the task has been modified. More...
| notify (result)
| Notifies about the result of the js funcion. More...
| prepare ()
| Prepares the task for execution. Performs any necessary setup before the task can be run.
| setErrorCode (error)
| Sets the error code for the task. More...
| setPriority (priority)
| Sets the priority of the task. More...
| setStatus (status)
| Sets the status of the task. More...
Public Member Functions inherited from NativeObjectWrapper
| constructor (r)
| GetPointerAsNumber ()

## Detailed Description

Represents a task for opening a document with specified settings and options.

Examples
  /Users/ec2-user/gitlab-runner/builds/E-xKdhDo/0/foxit/sdk/mobile/gsdk-doc-auto-build/harmony_nodejs/input/Index.js.

## Member Function Documentation

## ◆ constructor()

OpenDocumentTask.constructor | ( | settingData | ,
|  | openType | ,
|  | cb |
| ) |  |

Constructor for the OpenDocumentTask class.

Parameters

  {OpenDocumentSettingData} | settingData - The settings data for opening the document.
  {number} | openType - The type of opening operation (e.g., read-only or editable).
  {OpenDocumentTaskCallBack} | cb - The callback to be invoked with the result of the open document task. Initializes a new instance of the OpenDocumentTask with the specified settings, open type, and callback.

## ◆ getDocument()

OpenDocumentTask.getDocument | ( |  | ) |

Retrieves the PDF document opened by the task.

Returns
  {PDFDoc} The PDF document instance. Returns the PDF document that was opened as a result of this task.

## ◆ getXFADoc()

OpenDocumentTask.getXFADoc | ( |  | ) |

Retrieves the XFA document associated with the task.

Returns
  {XFADoc} The XFA document instance. Returns the XFA document if dynamic XFA is used; otherwise, it might be undefined.

## ◆ isDynamicXFA()

OpenDocumentTask.isDynamicXFA | ( |  | ) |

Checks if the document uses dynamic XFA.

Returns
  {boolean} True if dynamic XFA is enabled; otherwise, false. Determines whether the document being opened utilizes dynamic XFA.