PdfViewer
The PdfViewer widget allows you to show the PDF file from uploaded assets or the URL link.

Here's how you can add the PdfViewer widget to your project:
- 1.Drag the PdfViewer widget from the Base Elements tab (in the Widget Panel) or add it directly from the widget tree.
- 2.Move to the Property Editor (on the right side of your screen) and scroll down to the PDF Viewer section.
- 3.Find the Network Path property and enter the URL for the pdf file.
Every PdfViewer widget added to the project shows a default PDf from an online source.

By default, the widget is set to show the PDF file from Network. However, you can change this to use the PDF file uploaded directly to your app.
Here's how you can change the PDF source:
- 1.Select the PdfViewer widget from the widget tree or from the canvas area.
- 2.Move to the Property Editor (on the right side of your screen) and scroll down to the PDF Viewer section.
- 3.Find the PDF Source dropdown. Change it to Asset.
- 4.Now, find the PDF Asset property, Click on the Upload Pdf button, select the pdf file and upload it.
.gif?alt=media&token=434b529b-9aec-40a3-9383-e304c14adff8)
If you want to use the same pdf file multiple times in your app, you don't need to upload the same pdf multiple times. You can use the uploaded pdf for other PdfViewer widgets as well.
Once you upload the pdf file, you can use it throughout your app. You can manage your uploaded pdfs with the Project Media/Asset Manager.
To use an uploaded pdf:
- 1.Select the PdfViewer widget from the widget tree or from the canvas area.
- 2.Move to the Property Editor (on the right side of your screen) and scroll down to the PDF Viewer section.
- 3.Find the PDF Source dropdown. Change it to Asset.
- 4.Click on No asset selected (inside the dropdown) and choose the pdf file.
.gif?alt=media&token=e2a8835f-af45-4077-a0c9-97db243cab1a)
You can change the displaying size of the PdfViewer using the height and width property.
To change the display size:
- 1.Select the PdfViewer widget from the widget tree or from the canvas area.
- 2.Move to the Property Editor (on the right side of your screen) and scroll down to the PDF Viewer section.
- 3.Find the Width and Height.
- 4.There are three ways to set the dimensions:
- To set to an exact size, select PX and enter the desired values.
- To set the dimensions as a % of the screen size, select % and enter the desired value.
- To make the height or width of the PdfViewer the screen's height or width, just click on the infinity icon ().
.gif?alt=media&token=0abd8601-b0ba-4798-80d0-3c5abdac97fe)
By default, the PdfViewer allows you to scroll to the next pages in the vertical direction. However, you can change this behavior to allow scrolling in the horizontal direction.
To change the scroll direction:
- 1.Select the PdfViewer widget from the widget tree or from the canvas area.
- 2.Move to the Property Editor (on the right side of your screen) and scroll down to the PDF Viewer section.
- 3.Find the Horizontal Scroll and checkmark it (click on it).
.gif?alt=media&token=01e792bf-d87e-4331-96d8-6c2c01d9515a)
Last modified 2mo ago