0

Possible Duplicate:
android webview pdf

I am trying to open PDF in my own activity which contains large images.Using MuPDF and other Library goes slow down my app performance so I dont want to use that.

Is that possible to open PDF in own activity using webview from SD card file in android ??

Any help would be appreciated ...Thanks!!!

Community
  • 1
  • 1
neha neema
  • 79
  • 2
  • 7

1 Answers1

0

You may find Android PDF problem same as yours (of date Nov 2010), suggesting you to open stored pdf with Intent Call.

   File file = new File("/sdcard/your_file.pdf");
   Uri path = Uri.fromFile(file);
   Intent intent = new Intent(Intent.ACTION_VIEW);
   intent.setDataAndType(path, "application/pdf");
   intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); 
   startActivity(intent);

Also check How do I determine if Android can handle PDF

Community
  • 1
  • 1
prayagupa
  • 30,204
  • 14
  • 155
  • 192
  • I dont want to use third party tool to open PDF ,I want embeded PDF viewer in my application. Is this possible in android,If yes please suggest,How?? – neha neema Aug 26 '12 at 13:03