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

First you need some components.

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

How it looks from designer

Blocks
1.Open PDF from given path

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

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

Aia and Apk
Looking for AIA file, get it here:
http://sunnythedeveloper.epizy.com/2019/09/01/how-to-open-pdf-files/

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

Last updated 2019-08-31T18:30:00Z

And this will not work if you change package name

/Boban

1 Like

Any solution for that?
I think I have not read things correctly.

Hi Boban

Actually who is bringing Apps from others platform need to change the package name to continue using the same publication on Play Store. I’m thinking about. Thanks for the answer.

thank you for getting some inspirations from my work
How to view a pdf document

your example will work only on your development device, because the activity starter is not able to access files from the assets of your app
therefore you first have to copy them to the internal sdcard and access them from there

Taifun

1 Like

Thanks for your reply.
I want to ask then how to open PDF from sdcard?
How the PDF readers work?
If this is solved then it will be very useful.

To open those PDFs, you have to copy the file from sdcard to a hidden .folder (create a new in internal storage) and remove the spaces from its name (TaifunPDF foes NOT support spaces in name!).

see here

Taifun

1 Like

5 posts were split to a new topic: Can’t get TaifunPdf extension to work