Hi,
I created an offline AIR application to browse and view our product manuals.When the user selects a pdf, HTMLLoader displays the pdf in a pane. Things were working as designed in AIR 1.5. When we updated the runtime to AIR 2.0, the pdf opens in the second page instead of the first page. Frustrating situation since the second page is the copyright page and users get annoyed by all the little sentences which are hard to read. Issue still exists in 2.0.2.
Hi,
Is it possible to get some sample code that displays this behavior? I just tried with the following code with 2.0.2 and was unable to reproduce the problem.
Thanks,
Chris
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
creationComplete="init()">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
<![CDATA[
import mx.core.UIComponent;
private function init():void
{
if(HTMLLoader.pdfCapability == HTMLPDFCapability.STATUS_OK)
{
var request:URLRequest = new URLRequest("http://www.adobe.com/products/acrobat/pdfs/pdfaccess.pdf");
var pdf:HTMLLoader = new HTMLLoader();
pdf.height = 800;
pdf.width = 600;
pdf.load(request);
var container:UIComponent = new UIComponent();
addElement( container );
// displayObject goes to container
var displayO:Sprite = new Sprite();
container.addChild( pdf );
}
else
{
trace("PDF cannot be displayed. Error code:", HTMLLoader.pdfCapability);
}
}
]]>
</fx:Script>
</s:WindowedApplication>
Chris,
I also have this same problem and it started when moving to AIR 2.0. In my case there are a couple of extra clues.
I hope that helps because it is an annoying problem.
Thanks,
Rick
Hi Rick,
Thanks for the extra data points! Is it possible to get a copy of the pdf's that encounter this problem? Please feel free to email me at ccampbel@adobe.com with any samples (pdf, code, and/or compiled air app) you can provide.
Thanks,
Chris
Thank you guys for the sample code and pdf's. I've been able to reproduce this on Windows (25 - 50% of the time.) I've been unable to repro on Mac, please let me know if you see it there too. I've added an internal bug (#2685024) with a link back to this post for further investigation.
Thanks,
Chris
North America
Europe, Middle East and Africa
Asia Pacific