Foxit PDF RDK

Public Member Functions | List of all members
DrawPageTask Class Reference

Represents a task for drawing a page in a document with various settings. More...

Inheritance diagram for DrawPageTask:

## Public Member Functions
| constructor (settingData, cb)
| Constructor for the DrawPageTask class. More...
| getPDFPage ()
| Retrieves the PDF page associated with the task. More...
| getReflowPage ()
| Retrieves the reflow page associated with the task. More...
| getRender ()
| Retrieves the renderer used for drawing the page. More...
| getSettingData ()
| Retrieves the settings data for the drawing task. More...
| getStep ()
| Retrieves the current drawing step. More...
| getZoomScale ()
| Retrieves the zoom scale applied to the page. More...
| isPageReady ()
| Checks if the page is ready to be drawn. More...
| isProgress ()
| Checks if the drawing task is in progress. More...
| setBitmapBuffer (buffer)
| Sets the bitmap buffer for the page drawing. More...
| setMatrix (matrix)
| Sets the transformation matrix for the page drawing. More...
| setPageReady (isPageReady)
| Sets the page readiness status. More...
| setProgress (isProgress)
| Sets the progress status of the drawing task. 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...

## Detailed Description

Represents a task for drawing a page in a document with various settings.

## Member Function Documentation

## ◆ constructor()

DrawPageTask.constructor | ( | settingData | ,
|  | cb |
| ) |  |

Constructor for the DrawPageTask class.

Parameters

  {DrawPageTaskSettingData} | settingData - The settings data for the drawing task.
  {DrawPageTaskCallBack} | cb - The callback to be invoked with the result of the drawing task. Initializes a new instance of the DrawPageTask with the specified settings and callback.

## ◆ getPDFPage()

DrawPageTask.getPDFPage | ( |  | ) |

Retrieves the PDF page associated with the task.

Returns
  {PDFPage} The PDF page being drawn.

## ◆ getReflowPage()

DrawPageTask.getReflowPage | ( |  | ) |

Retrieves the reflow page associated with the task.

Returns
  {ReflowPage} The reflow page being drawn.

## ◆ getRender()

DrawPageTask.getRender | ( |  | ) |

Retrieves the renderer used for drawing the page.

Returns
  {Renderer} The renderer responsible for page drawing.

## ◆ getSettingData()

DrawPageTask.getSettingData | ( |  | ) |

Retrieves the settings data for the drawing task.

Returns
  {DrawPageTaskSettingData} The settings data associated with the task.

## ◆ getStep()

DrawPageTask.getStep | ( |  | ) |

Retrieves the current drawing step.

Returns
  {string} The current step or status of the drawing process.

## ◆ getZoomScale()

DrawPageTask.getZoomScale | ( |  | ) |

Retrieves the zoom scale applied to the page.

Returns
  {number} The zoom scale factor for the page rendering.

## ◆ isPageReady()

DrawPageTask.isPageReady | ( |  | ) |

Checks if the page is ready to be drawn.

Returns
  {boolean} True if the page is ready; otherwise, false.

## ◆ isProgress()

DrawPageTask.isProgress | ( |  | ) |

Checks if the drawing task is in progress.

Returns
  {boolean} True if the task is in progress; otherwise, false.

## ◆ setBitmapBuffer()

DrawPageTask.setBitmapBuffer | ( | buffer |  | ) |

Sets the bitmap buffer for the page drawing.

Parameters

  {ArrayBuffer} | buffer - The buffer containing bitmap data to be used for drawing.

## ◆ setMatrix()

DrawPageTask.setMatrix | ( | matrix |  | ) |

Sets the transformation matrix for the page drawing.

Parameters

  {Matrix2D} | matrix - The 2D matrix used for transforming the page rendering.

## ◆ setPageReady()

DrawPageTask.setPageReady | ( | isPageReady |  | ) |

Sets the page readiness status.

Parameters

  {boolean} | isPageReady - True if the page is ready to be drawn; otherwise, false.

## ◆ setProgress()

DrawPageTask.setProgress | ( | isProgress |  | ) |

Sets the progress status of the drawing task.

Parameters

  {boolean} | isProgress - True if progress is ongoing; otherwise, false.