0

I am going to write an android app, which will contain a PDF file (included with in the application). My task is, when i click a button , pdf file should open . PDf file is placed in assets/raw (not sure where to place ).

Can any one help on this...

Thanks in advance

3
  • Open the PDF and display it on the phone?
    – turbo
    Nov 14, 2013 at 16:50
  • thanks turbo for quick response, But i do not know how to open a pdf file which is placed in raw/assests folder Nov 14, 2013 at 16:58
  • Open it and do what with it though, simply display it? I don't think you really even do anything else, but your question does not make it clear. See the linked possible duplicate and see if that solves your issue.
    – turbo
    Nov 14, 2013 at 17:08

2 Answers 2

0

You can open pdf via webview and google docs. You should use

WebView.loadUrl("http://docs.google.com/gview?embedded=true&url=www.site.com/file.pdf");
1
  • Since the PDF is not an online resource, this will become rather complicated.
    – Janis F
    Nov 14, 2013 at 18:05
0

I would use a PDF Renderer to convert the file to a Bitmap. Otherwise, you would have to use another application to open the file, or the option that Walter gave you. Here is an example using a different library for rendering a PDF using Java.

Not the answer you're looking for? Browse other questions tagged or ask your own question.