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

Adobe AIR Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Contributor
Posts: 22
Registered: ‎12-17-2010
My Device: Not Specified
Accepted Solution

Seriously ... how to display PDF content?

Hello everybody,


I wonder how to diplay PDF content on the PB (in AIR it is possible according to Adobe).


The following code leads to "ERROR_INSTALLED_READER_NOT_FOUND".

 

if(HTMLLoader.pdfCapability == HTMLPDFCapability.STATUS_OK)
{
    trace("PDF content can be displayed");
}
else if(HTMLLoader.pdfCapability == HTMLPDFCapability.ERROR_INSTALLED_READER_NOT_FOUND)
{
    trace("PDF cannot be displayed. Error code:
ERROR_INSTALLED_READER_NOT_FOUND");
}

 

Does this mean the PB will have no PDF capability built into the base system or is this just a module which is skipped because the PB simulator comes pretty "naked"?

 

I really wonder how integration with other apps or technologies will work.

Besides PDF I think of:

  • Accessing the system mails
  • Accessing the system calendar
  • Accessing the system address book
  • Copy paste between applications

We need an updated SDK :-)

Developer
Posts: 1,008
Registered: ‎12-12-2010
My Device: Passport (Red Limited Edition)
My Carrier: Mobile Vikings

Re: Seriously ... how to display PDF content?

[ Edited ]

There is no doubt that we need an updated SDK. Current SDK and simulator offer the very minimum of functions, so I would advise to either wait or to use a 3rd party library (if this is possible).

 

As for your other questions, I expect some more intel on this when CES has begun.

-------------------------------------------
BlackBerry Certified Builder for Native Application Development -- Proud member of the Belgian BlackBerry Developer group
Samples: Park in Ghent
Feeling generous? Nominate me for BB Elite member!
Highlighted
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Seriously ... how to display PDF content?

I wish they would support the HTML class like normal AIR applications.  Showing a PDF in the HTML viewer is just a few lines of code.

 

We're all in violent agreement that we need an updated SDK.

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Seriously ... how to display PDF content?


germama wrote:
Does this mean the PB will have no PDF capability built into the base system or is this just a module which is skipped because the PB simulator comes pretty "naked"?

Rest assured that the PB will have PDF display capability though. 

 

For one thing you can see the Acrobat Reader logo on one of the app icons in some of the videos we've seen. 

 

For another, though I don't recall where, I'm fairly sure in one video a RIM or QNX employee stated clearly that PDF would be "natively" supported.  (I think that was the word used... it puzzled me a bit at the time, which would be why I remember it.)

 

The problem, as others have just said, is that until the SDK is out (soon?  uncertain...) or we hear a bunch more announced (nearly certain, at CES) we'll have no idea how any of the things you've mentioned will be handled.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Contributor
Posts: 22
Registered: ‎12-17-2010
My Device: Not Specified

Re: Seriously ... how to display PDF content?

The HTML class would be just great :-)

 

But when looking at the current SDK, at some points we can see that the must already have an underlying HTML rendering engine, somehow.

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Seriously ... how to display PDF content?

The HTML engine is already there, though buggy in the current release.  And undocumented.  But search the forum for QNXStageWebView and StageWebView for more on that including examples of use.  It takes ten minutes to write a basic browser using it, just for kicks.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Contributor
Posts: 22
Registered: ‎12-17-2010
My Device: Not Specified

Re: Seriously ... how to display PDF content?

Found it here ...

 

http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-Adobe-AIR/Web-Browser/m-p/621682/highlight/...

 

var webView:QNXStageWebView = new QNXStageWebView();

var rect:Rectangle = new Rectangle(0, 60, 1024, 680);

// Set layout
webView.stage = stage;
webView.viewPort = rect;
webView.autoFit = true;

// Functionality
webView.enableCookies = true;
webView.enableJavascript = true;
webView.enableScrolling = true;

// ...
getUrl('http://www.google.com'); // Home page preset

// ...

// getUrl method
function getUrl(url:String):void{
webView.loadURL(url);
}

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Seriously ... how to display PDF content?

RIM also just posted a new "Web Fidelity" video that further demonstrates the capabilities of the HTML engine, mostly focusing on Flash, and how it works just like a desktop machine's browser: i.e. their "no compromises" mantra.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Seriously ... how to display PDF content?

Nice.

 

I imagine, BB is working very hard to get things ready for CES.  This might delay us getting a new SDK and simulator until after the show.  So they will either have to slip the contest for the free PB or we have to deal with 0.9.1 as the last release before the contest ends.

Contributor
Posts: 28
Registered: ‎02-17-2011
My Device: Not Specified

how to display PDF content?

haiii.....i am developing an application for blackberry playbook. i need to display pdf content. i have tried with QNXStageWebView class. Bt its not getting displayed. Is ther any other way to display it?

 

 

regards,

Aswathy