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:
Pdf.aia (21.5 KB)

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

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

2 Likes

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

2 Likes

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!).

1 Like

see here

Taifun

1 Like

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

Hello! I am using option 3: Load a PDF online from URL but the pdf is not downloading. I’m new to kodular and I don’t know if I missed something or if I need to make a new page to open the pdf. Thanks

Would you help me. when i install the app it doesn’t work

Hi @Aplicativo_Checklist
What is not working?

I need to send a pdf file of my arrangement created to my “/ storage / emulated / 0 /” directory, by whatsapp, email etc.
Use ActivityStarter as SEND, but when I use the test on the kodular it opens a normal guide for sending, but when I install the apk, it does not open this guide to send the produced pdf.

A post was split to a new topic: How to use the activity starter to open another app?

didn’t load correctly, 3-4 button click to open pdf file correctly,any solution?

It is based on network speed

i have a 4g network,and check wifi also,its same problem after 3-4 click then load file, i used 3 pdf link to load one webviewer with different button,then show the correctly block?

Would it hurt to download the pdf to your device, then read it from there ? (Lets face it, you will be downloading it anyway in order to view it…)

i want to show url to pdf,i searched in community there are no extension, i will check inAppPdf viewer also but not work properly