Working on Velo with PDF: View with 3D Flip Effects app
Updated over a week ago

This feature is only available in Pro plan. Learn how to upgrade app

Methods

setPdfUrl()

Viewer will update the current PDF document with the configuration set in the widget panel.

Syntax: setPdfUrl(url: String)

Example code:

$w("#pdfViewer1").setPdfUrl("YOUR PDF URL")

Events

Events can be found in the Properties panel in the Editor. View the Properties panel by choosing Tools > Developer Tools > Properties Panel.

Here's an example of code:

export function pdfViewer1_onReady() {
// add your own code here
}

Code example

$w.onReady(function () {
$w('#sourceAButton').onClick(()=>{
$w('#pdfViewerDynamic').setPdfUrl("YOUR_FILE_URL")
})
$w('#sourceBButton').onClick(()=>{
$w('#pdfViewerDynamic').setPdfUrl("YOUR_FILE_URL")
})
});

Did this answer your question?