0

So, I would need a option to view a PDF within my own app (yes, so basicly I don´t need something like the code i will post as example below.... since it will just open the PDF in a new window using a external, installed app on the device)

final Intent pdfIntent = new Intent(Intent.ACTION_VIEW);
pdfIntent.setDataAndType(path, "application/pdf");
this.startActivity(pdfIntent);

What i want to do is to open (and view) a PDF inside my app, so for example inside a FrameLayout within any layout file from my app. I know, that there would be the option to upload the PDF and using a WebView and GoogleDocs to display the PDF - but since you can´t call GoogleDocs without a internet connection... well, I need something else. I searched for librarys, wich are able to read/view and display PDFs (and wich you can use for free), but most of the android compatible results i found were just other stand-alone apps... and like I mentioned before, I want to view the PDF within MY app, in a FrameLayout (without opening a new window) or something and nothing else.

Does anybody know if there is a option to do this?

Josh Crozier
  • 233,099
  • 56
  • 391
  • 304
user1502353
  • 99
  • 1
  • 10
  • Then, you've to use some `PDF`'s jar to do this. – Praveenkumar Oct 11 '12 at 07:17
  • Yeah, sounds logic... but I sadly couldn´t find any good working, free PDF jar for android. The only one I found (I even forgot the URL) throwed really much jar-internal exceptions. – user1502353 Oct 11 '12 at 07:31
  • Then, just try [this](http://stackoverflow.com/questions/10299839/how-to-read-pdf-in-my-android-application/10352422#10352422) and also [this](http://stackoverflow.com/a/11027745) – Praveenkumar Oct 11 '12 at 07:44
  • The first one was exactly the one I tryed out, just did everything like it´s sayed in the thread and tested it out with a pdf... it throws really much jar internal exceptions, there is no point to my code. @second one: most of them I can´t use for my app as far as i know. But I am gonna look at them. – user1502353 Oct 11 '12 at 07:59

0 Answers0