File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Android and the fly likes Displaying pdf files through our application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "Displaying pdf files through our application" Watch "Displaying pdf files through our application" New topic
Author

Displaying pdf files through our application

shruthi sridhar
Greenhorn

Joined: Oct 10, 2007
Posts: 11
Hi,

Is there a way to read pdf files and display it in our application on Android?...

If there isnt any built in support, can we pass on the pdf to any third party pdf reader application? If yes then how do we do it?

Looking forward for help ..

-Shruthi
Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1369
    
    1

If you do a search for "PDF reader/PDF viewer" you will get a list of quite a few applications that propose to do so..

So, if you want to know whether it is possible to view a PDF file; you now know it is.

If you have such an application installed on your Android device, you should be able to invoke it by sending an appropriate intent to the system and passing appropriate data to it.


[List of FAQs] | [Android FAQ] | [Samuh Varta]
shruthi sridhar
Greenhorn

Joined: Oct 10, 2007
Posts: 11
Thanks for your quick reply.

Yes. I was exploring that option to call through an intent. But i am not able to figure out how to proceed with it. A sample code would help me to proceed.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15957
    
  19

My new phone came with Adobe Reader. I suspect, however, that it's basically just a port of the stock reader app and not intimately aware of Android. Still, I'd expect that at least you should be able to launch it with a reference to a document file.

Check out Adobe's forums and see if they can help.

Then come back and tell us!


Customer surveys are for companies who didn't pay proper attention to begin with.
Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1369
    
    1

shruthi sridhar wrote:Yes. I was exploring that option to call through an intent. But i am not able to figure out how to proceed with it. A sample code would help me to proceed.


If I had any PDF reader on my phone, I would launch the application and monitor the logcat. Whenever, a new Intent is launched, logcat generally lists the Intent action, Flags, component names and things alike. It is then just a matter of creating *similar* intent object.

The only part, I presume, you need to worry about would be the data that you might need to set and perhaps its MIME type. And you can only get to know that from the creators of the application as Tim already suggested.

@Tim: Glad to see you in Android forum
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15957
    
  19

Monu Tripathi wrote:

@Tim: Glad to see you in Android forum


I've been lurking around for a while, but last week, my decrepit old Windows Mobile WiFi Bluetooth phone magically transformed itself into a Windows Mobile WiFi PDA. When it boots, it says "radio: None" and you can't switch the telephony features on and off any more. Since that was my business phone, I'm now proud owner of a brand new HTC Hero, and if I'm lucky I'll even get the #%#$$$@$@ rebate.

Android has a lot of apps in the store, but I've already found some things that I'd like to do better.

shruthi sridhar
Greenhorn

Joined: Oct 10, 2007
Posts: 11
Thanks Monu.. followed what you said.. it helped
shruthi sridhar
Greenhorn

Joined: Oct 10, 2007
Posts: 11
Thanks Monu ... followed what you said and it helped
kanna chowdary
Greenhorn

Joined: Dec 22, 2009
Posts: 3
hi


I want to get data from webserver which is in the format of pdf. And display it in my android emulator.

Is there a way to read pdf files and display it in our application on Android?... could you please give
me solution with sample code.

Looking forward for help ..
 
 
subject: Displaying pdf files through our application
 
Similar Threads
Correct Generated File Extensions from Action
on-the-fly pdf convertion
opening pdf documents in swing components
PDF with Question marks
on-the-fly pdf convertion