Introduction
The PDF component is a user interface element that allows users to view, manage, and download PDF documents.
Configurations
Category |
Configuration |
Example |
Description |
Content |
PDF source |
The three modes for the PDF source. |
|
URL |
Applies when the PDF source is URL. The value is the link to the PDF document. |
||
System file |
Applies when the PDF source is System file. Select a PDF document uploaded to the built-in resource files, or click the selection box below to upload a file directly. |
||
Memory object |
|
Applies when the PDF source is Memory object. It can be associated with the upload component. For example: |
|
Current page number |
The page number of the current page in the PDF document. |
||
Show toolbar |
Specifies whether to show the header toolbar. |
||
Interaction |
Hidden |
Controls the default display state of the PDF component. If set to |
|
Style |
Height |
For more information, see Common properties |
|
Margin |
For more information, see Common properties |
Properties and methods
Name |
Type |
Example |
Description |
src |
string |
|
The link to the current PDF document. |
file |
object |
|
Read-only. The PDF document file resource. |
pageNumber |
number |
|
The current page number of the PDF document. |
totalPageNumber |
number |
|
The total number of pages in the PDF document. |
title |
string |
|
The title of the PDF component. |
setPageNumber |
func |
|
Sets the page number of the PDF document to |
clearPageNumber |
func |
|
Clears the page number of the PDF document. |
downloadToImage |
func |
|
Downloads page |
download |
func |
|
Downloads the PDF document. |
getCurrentPageDataURL |
func |
|
Gets the dataURL encoded data of the current page. |
