0

I have a 600 page PDF that I call an intent from a previously installed PDF application to view. The app works fine but I have received complaints that it is just a PDF. I would like to know is there an optimal way to display a file such as this (two columns with images) in a way that it is viewed by the user in the best (mobile?) format possible? Hopefully an automated tool, converting to word and manually changing it is a daunting task.

As I said above the app already has the ability to view the PDF file. I wanted to know what the best mobile friendly format was.

user1363871
  • 580
  • 3
  • 11
  • 29
  • Maybe [this](http://stackoverflow.com/a/10647418/940096) can be helps you. – Praveenkumar May 23 '12 at 05:19
  • Calling Intent is the better option..if use Adobe Reader application in that settings u ve option for two columns...if v use our own code to display PDF file it is very difficult to do... – P Srinivas Goud May 23 '12 at 04:59

2 Answers2

1

Use Below code -

Uri path = Uri.fromFile(pdfFile); 
Intent pdfIntent = new Intent(Intent.ACTION_VIEW);
pdfIntent.setDataAndType(path, "application/pdf");
pdfIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
try
{
    startActivity(pdfIntent);
}
catch(ActivityNotFoundException e)
{

}
Praveenkumar
  • 24,084
  • 23
  • 95
  • 173
raju
  • 785
  • 3
  • 14
  • 28
1

If you want to open PDF you we should install PDF viewer or you can prefer NDK for reading data from PDF file.

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

Note: generally we can't view PDF files in the emulator .

Flexo
  • 87,323
  • 22
  • 191
  • 272
sravan
  • 5,303
  • 1
  • 31
  • 33