PDF

An embedded PDF file from a URL or that is Base64 encoded. It supports automatic scaling the content to fit either the width or height of the component.

Properties

Available properties for PDF with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read information about components.

NameTypeDescriptionhiddenboolean

Whether the component is visible.

maintainSpaceWhenHiddenboolean

Whether the component takes up space on the canvas if hidden is true.

marginstring

The amount of margin to render outside of the component.

retoolFileObjectobject

A file representation that is shared by components on Retool.

retoolStorageDynamicInputboolean

Whether the input for retoolStorageFileId is dynamic.

retoolStorageFileIdstring

The id of the uploaded image when srcType is retoolStorageFileId.

scaleMode'width' | 'height'

Whether to scale the contents based on the width or height of the component.

scrollSnapboolean

Whether to automatically adjust the scroll position to the top of each page if scaleMode is height.

showInEditorboolean

Whether the component remains visible in the editor if hidden is true.

showTopBarboolean

Whether to display a top bar that contains user actions and title, if set.

srcstring

The source URL.

srcType'src' | 'retoolStorageFileId' | 'retoolFileObject'

The type of the image source. Either src, dbBlobId, or storageBlobId.

titlestring

The title to display in the top bar when showTopBar is true.

tooltipTextstring

The text to display in a tooltip on hover or focus.

Methods

Methods for interacting with PDF. You can write JavaScript almost anywhere in Retool and use methods to manipulate data or components.

NameDescriptionscrollIntoView(options: any)

Scrolls the canvas or parent container so that the selected component appears in the visible area.

setHidden(hidden: boolean)

Set the hidden value to toggle whether the component is visible. Defaults to true without a parameter.

setFileUrl(value: string)

The source URL.