Components
keyboard_arrow_up
Add
Pdf Viewer
-
Description
Pdf Viewer
The PDF Viewer component will allow us to view pdf files within our app very simply
-
Procedures
- Load From Assets
- This method allows us to load and display a pdf file that we have previously uploaded to the builder. Simply put the name of the uploaded file, remember to also put the extension not only the name. We must also indicate if we want to see the pdf sliding horizontally or vertically. With this we could already visualize our pdf.
- Load From Storage
- This method allows us to load and display a pdf file that we have in the storage of our phone. Simply put the path where the pdf is located, for example if our file it was called Example.pdf and it was in the Download folder, we should put the following path: Download/Example.pdf. We must also indicate if we want to see the pdf sliding horizontally or vertically. And we could already visualize our pdf.
-
Example
- View a pdf from assets
- As you can see it is very simple to load a pdf from the files. We simply put the name of the pdf that we have uploaded and indicate if we want to see it horizontally or vertically.
- View a pdf from storage
- In this case we are loading the pdf from the Phone Storage. In the example we show how we would load a pdf called Example.pdf and that is in the Download folder.