PDF Viewer component
Displays a PDF.
Properties
All properties for this object with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.
hidden
Whether this object is hidden from view.
Type | boolean |
Format | True/False |
Configurability | Inspector > Appearance > Hidden |
Default | false |
Examples
true
mobileOfflineAssetId
A user-defined identifier for the underlying cached PDF.
Type | string |
Format | string |
Configurability | Inspector > Content > PDF source > Offline Asset |
Default | null |
Examples
test_asset
pdf_1
retoolFileObject
The file's data when using a file not stored in Retool Storage.
Type | object |
Configurability | Read-only |
Default | null |
Object Properties
Examples
{
"name": "sample.pdf",
"type": "application/pdf",
"sizeBytes": 10523,
"base64Data": "JVBERi0xLjQKJeLjz9...G"
}
retoolStorageFileId
The unique identifier for a file in Retool Storage.
Type | string |
Format | UUID |
Configurability | Inspector > Content > File input |
Default | null |
showRotateButton
Whether to show the rotate button.
Type | boolean |
Format | True/False |
Configurability | Inspector > Content > Add-ons > Rotate button |
Default | false |
showTopBar
Whether to display a toolbar.
Type | boolean |
Format | True/False |
Configurability | Inspector > Content > Add-ons > Top bar |
Default | false |
showZoomControls
Whether to show the zoom controls.
Type | boolean |
Format | True/False |
Configurability | Inspector > Content > Add-ons > Zoom controls |
Default | false |
Examples
https://upload.wikimedia.org/wikipedia/commons/1/14/Marspathfinder.pdf
srcType
The source type of the PDF. Depending on the value of this field, we will use different properties for the PDF source
Type | string | ||||||||||||
Configurability | Inspector > Content > PDF source | ||||||||||||
Allowed Values |
| ||||||||||||
Default | null |
viewMode
Whether the PDF is scrollable within a smaller container, or the device screen.
Type | string | ||||||
Configurability | Inspector > Appearance > View mode | ||||||
Allowed Values |
| ||||||
Default | null |