Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Contributor
Posts: 2
Registered: ‎05-05-2010
My Device: 9550

Current status of PDF (and PowerPoint & Word) in app rendering

Hello all,

 

I've been searching these forums and the internet in general regarding this problem. What I have seen so far has not been good but most of the info appears to be at least 6 months old and even then no success stories. I'm targeting 5.0 and I'm hoping something has changed.

 

I have an application that is currently an iPhone app which is being ported to BlackBerry. The data for this app are meta objects which contain many different files which are displayed in the app. Sorry I can't be more detailed, but it's not my app and my place I'm just the developer. Anyway, these meta objects contain many things such as images, sounds, videos, html documents, pdf documents, word documents and powerpoint documents.

 

In the current (iPhone) app, when it comes time to play a video or display a pdf from the big meta object, it's all internal to the app not requiring the user to leave the app context and breaking containment.

 

I have the same functionality ported to the BlackBerry for playing the sounds and videos and showing the pictures and html. However, I'm at a total loss for displaying the "Office" docs. I can't seem to find a way to render this data within my application. There is no need to edit these docs, they are read only, I just want to provide an in app experience for the user.

 

So for example, during the course of interacting with the meta object, I might want them to read a pdf and once they have completed reading it, dismiss the pdf at which point the user might be prompted with some options (Buttons) related to the pdf.

 

It's not a one time conversion of a single object, so just converting all of the data in HTML for example is not a good solution, but maybe the only one. The best analogy I can make is a game level, which is made up of textures, sprites, rules, images, etc. In this case the game level is equivalent to the meta object in my application.

 

Sorry for the long exposition. I'm trying to avoid the pat answer of "Use X application" and get to the core Java capabilities available in the BlackBerry API today.

 

Thanks, Ed

Developer
Posts: 1,805
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.3253, Z10 (STL100-3)-10.3.1.997 Dev OS, Z30 (STA100-5)-10.3.1.997 Dev OS, Passport (SQW100-1)-10.3.0.1418, PlayBook (16GB)-2.1.0.1917

Re: Current status of PDF (and PowerPoint & Word) in app rendering

Nope, there is no built-in support for any MS Office documents or PDF reading and rendering.

 

You can check to see if DocumentsToGo is on the device and use it to display the documents, you can write your own renderer, have server process and render it, or (as you already mentioned you don't want to do) convert it to HTML.

 

For the PDF, as I said in this post you can try to port/use/etc. something from: http://supportforums.blackberry.com/t5/Java-Development/PDF-Viewer/m-p/260415, http://supportforums.blackberry.com/t5/Java-Development/PDF-Renderer-Component/m-p/204648, or try to come up with your own.

 

Though I said PDF and Office documents are not supported, PDFs have a very rudimentary support for when you, say, open an attachment.

 

They are not exactly the anwsers I would like to give but I doubt that these will be fully supported unless RIM buys DocumentsToGo or something similar.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
New Contributor
Posts: 2
Registered: ‎05-05-2010
My Device: 9550

Re: Current status of PDF (and PowerPoint & Word) in app rendering

Thanks for the information. I might look at using one of the java libs for pdf. I doesn't seem like there are any success stories out there with this type of solution.

 

I was really hoping that maybe the situation had changed. The app doesn't really support the scenario where certain pieces can be skipped of the supporting app is not installed.

 

Sorry for the newbie nature of this question, but I'm not a hardcore blackberry user at this point. If we blow the pdf out to a different app, is there a way for my app to interact with it? In other words, can my app "Know" when the user is done viewing the document via a callback or something or is it completely dependent on the user to take the initiative to switch back. Can one app control the menu options for another?

Developer
Posts: 1,805
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.2.1.3253, Z10 (STL100-3)-10.3.1.997 Dev OS, Z30 (STA100-5)-10.3.1.997 Dev OS, Passport (SQW100-1)-10.3.0.1418, PlayBook (16GB)-2.1.0.1917

Re: Current status of PDF (and PowerPoint & Word) in app rendering

First off the libraries that I gave aren't all J2ME compatible so some porting will be required.

 

As for your other question, unlike the iPhone (for now), BlackBerry supports multiple apps running at the same time, so it is possible to invoke other apps to start, pass arguments, etc. You can implement a GlobalEventListener to send information to and from one app to another. You can also use EventInjection to control menus and UI elements.

 

Just know that some APIs like the EventInjector require code signing to use the app on the device so make sure you have one (it's pretty much unlimited and only costs $20). One other tip is to look at the samples, there are many apps that demonstrate how to do stuff like invoke apps or "Interprocess Communication."

 

Hope that helps, if you have any other questions though try to create a separate post. Thank you.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Developer
Posts: 159
Registered: ‎08-19-2008
My Device: Not Specified

Re: Current status of PDF (and PowerPoint & Word) in app rendering

You can view pdf documents by installing BlackberryInternetServices on the device ............It will display pdf in blackberry browser ...............

 

But , pdf you cannot view on simulator.....................only after installing blackberryInternetServices you can view pdf & it will work for all devices of OS more than 4.5+ ........................

 

Similarily you can try for MicrosoftOfffice documents