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

user2837117
  • 1
  • 1
  • 1
  • Open the PDF and display it on the phone? – turbo Nov 14 '13 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 – user2837117 Nov 14 '13 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 '13 at 17:08

2 Answers2

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");
walter
  • 1
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.

Community
  • 1
  • 1
Luis Lavieri
  • 4,064
  • 6
  • 39
  • 69