FoxitPDFSDKforWeb  v10.0.0
Foxit PDF SDK for Web
ProgressComponent Interface Reference

The ProgressComponent is an interface class that represents a component for displaying the progress of a task. It can be used to provide a visual indication of the progress of a task that may take some time to complete. More...

Public Member Functions

void hide ()
 A method used to hide the component. More...
 
void show (coverOn)
 A method used to display the component on the page. More...
 
 updateProgress (progress, status)
 A method used to update the progress of the task. More...
 

Detailed Description

The ProgressComponent is an interface class that represents a component for displaying the progress of a task. It can be used to provide a visual indication of the progress of a task that may take some time to complete.

Note
The default progress component will display when one of the following operations is performed
1. PDFDoc.sign
2. PDFDoc.addWatermark
3. PDFDoc.addAnnots
4. Action: Run Form Recognition on the UI
5. PDFViewer.print
6. PDFViewer.printEx
let progressComponent = new PDFViewCtrl.viewerui.ProgressComponent();
progressComponent.show(document.body);
progressComponent.updateProgress(20, PDFViewCtrl.constants.PROGRESS_STATUS.PROGRESSING);
// Finish with success.
// progressComponent.updateProgress(null, PDFViewCtrl.constants.PROGRESS_STATUS.SUCCESS);
// Finish with fail.
// progressComponent.updateProgress(null, PDFViewCtrl.constants.PROGRESS_STATUS.FAIL);
let progressComponent = new PDFViewCtrl.viewerui.ProgressComponent();
progressComponent.show(document.body);
progressComponent.updateProgress({current: 1, total: 4}, PDFViewCtrl.constants.PROGRESS_STATUS.PROGRESSING);
// Finish with success.
// progressComponent.updateProgress(null, PDFViewCtrl.constants.PROGRESS_STATUS.SUCCESS);
// Finish with fail.
// progressComponent.updateProgress(null, PDFViewCtrl.constants.PROGRESS_STATUS.FAIL);
Since
9.1.0

Member Function Documentation

◆ hide()

void ProgressComponent::hide ( )

A method used to hide the component.

Since
9.1.0

◆ show()

void ProgressComponent::show ( coverOn  )

A method used to display the component on the page.

Parameters
[coverOn]HTMLElement|Component - Overlaid element.
Since
9.1.0

◆ updateProgress()

ProgressComponent::updateProgress ( progress  ,
status   
)

A method used to update the progress of the task.

Note
This function is triggered when the progress data changes. When this updateProgress() is called, the ProgressComponent should update its UI to reflect the new progress and status.
Parameters
progressnumber|Object - This parameter can be either a number or an object. If it is a number, it represents the overall progress of the task as a percentage. If it is an object, it has two properties: current and total, which represent the current progress and total progress of the task, respectively.
progress.currentnumber - This property represents the current progress of the task.
progress.totalnumber - This property represents the total progress of the task.
statusstring - This parameter indicates the current status of the task progress.
It should be one of the values defined in the PROGRESS_STATUS constant.
Since
9.1.0

Foxit Software Corporation Logo
@2024 Foxit Software Incorporated. All rights reserved.