How to open Pdf files?

I saw many users asking questions related to Pdf.
So in this guide I am going to tell you that how you can open pdf in your app without any extension.
First of all thanks to @Taifun for guide on his website.
https://puravidaapps.com/snippets.php#2pdf 58

First you need some components.

  • Textbox
  • Button
  • Webviewer
  • Activity Starter
  • Web (to decode uri)

 

How it looks from designer

01-14_29_52

Blocks

1.Open PDF from given path

blocks%20(8)

Here we have configured Activity Starter so that it will load pdf with in an external Pdf Reader app.
Action: android.intent.action.VIEW
Data Type: application/pdf
 

2.Pick PDF and open it
blocks%20(9)

blocks%20(11)

Here Activity Starter will open a prompt to pick file and convert file uri to path and load it with external Pdf Reader app.
Action: android.intent.action.GET_CONTENT
Data Type: application/pdf
 

3.Load a PDF online from URL
blocks%20(12)

Use this option if you want to open a pdf from url (direct).It will use Google’s Docs Viewer so it will provide a lot of features to users.

Aia and Apk
Looking for AIA file, get it here:
Pdf.aia (21.5 KB)

Want to test Apk?
Here is a test apk:
Pdf.apk (5.1 MB)

Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments