10-13-2009 07:19 PM
Hello all,
I have been tasked with writing an application that downloads and opens PDF on a blackberry. I have the downloading part solved. How does one go about determing if the target device can view a PDF? Then how do you switch applications to the PDF viewer to view the file? Or can you the PDF inside your own application with some build in object?
Thank you,
10-14-2009 02:43 AM
Check these threads.
10-14-2009 10:27 AM
Yes,
I have read these. (and many like them) It seems odd to me since the blackberry devices have a PDF viewer , but there are no hooks into it like the API like the hooks for the browser. For example from C/C++ i can say System.exec( "open my.pdf" ); Once I download a PDF how can I launch another application and open it. Even if i download a third part PDF browser same problem, how do i launch that program from my code and open the pdf? It seems like the other option is to find some open source Java toolkit.
Seems so crazy that a blackberry can view a PDF and you cant just reuse that in any way.
10-15-2009 01:19 AM
10-28-2009 05:08 PM
So ok here is a funny thing
When viewing the pdf like this:
BrowserSession browser = Browser.getDefaultSession();
browser.displayPage(url);
browser.showBrowser();
There are no pictures. but when I send the same PDF to my mailbox the blackberry opens its with images.
Can I get the browser to render PDF like the "Open attachment does"
I have looked at the application manager,
What is the name of the application that opens the PDF from the mail client?
What is the Module and how can I pass the URL/FileName of the document I wish to open?
10-28-2009 07:56 PM
I believe that's because attachment rendering is done server-side; there's nothing on the client that explicitly does this, I think.
10-29-2009 10:38 AM
ydaraishy...I am starting to agree with you. When I open a PDF through email I see the traffic moving back and forth. This leads me to believe that a sever based application is doing conversion and sending JPEG's to the device.
BbDeveloper, I would like to try your solution however, I am looking in the ApplicationManager class.
1) what can I do to list all the applications on the device.
--or
2) What is the name of the application that opens PDF
--and--
3)Whar arguments would I have to send to open a file already downloaded to the device.
Thank you