Skip navigation
Currently Being Moderated

AIR 3 Bug: PDF width is more than HTML width

Oct 17, 2011 7:38 AM

In AIR 3, I'm loading a PDF using the mx:HTML component. Here's some sample code:

 

<?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"

showStatusBar="false">

<s:layout>

<s:HorizontalLayout paddingBottom="8" paddingLeft="8" paddingRight="8" paddingTop="8"/>

</s:layout>

<s:VGroup width="100%" height="100%">

<s:Button label="Open PDF" click="html.location = 'http://samplepdf.com/sample.pdf#toolbar=1&navpanes=0&view=FitH,top'"/>

<s:DataGrid width="100%" height="100%"/>

</s:VGroup>

<s:BorderContainer width="100%" height="100%" backgroundColor="#EFEFEF">

<mx:HTML id="html" width="100%" height="100%"/>

</s:BorderContainer>

</s:WindowedApplication>

 

The HTML area has a width of 100% but only takes up half the screen due to another component which is also trying to use 100% of the screen. In AIR 2.x the PDF displays fine, but in AIR 3 the PDF displays as though it's using the.entire width of the runtime window instead of the HTML's width.

 

If the runtime window is resized, minimized or maximized, the PDF width automatically changes and matches the HTML width, which displays fine. This is the only workaround I have found that doesn't involve removing software from the workstation. Another user has found that downgrading from Acrobat 10.x to 9.x also works, but for Windows 7 users that have Acrobat 8 Pro and Reader 9 (like me) this causes errors (that are fixed in Reader 10), so this isn't a suitable workaround for me.

 

Here's the bug report: https://bugbase.adobe.com/index.cfm?event=bug&id=3000289

 

Any chance this bug could be looked into urgently as it's preventing us from using AIR 3 or any Flex applications that use the AIR 3 SDK?

 
Replies
  • Currently Being Moderated
    Oct 18, 2011 3:50 PM   in reply to RandomReado

    me too, please prioritise this

     
    |
    Mark as:
  • Chris Campbell
    9,456 posts
    May 4, 2010
    Currently Being Moderated
    May 25, 2012 1:09 PM   in reply to RandomReado

    Thank you for posting a possible workaround.  For others interested in this bug, please give the workaround a try and let us know in the bug comments and vote section.

     

    https://bugbase.adobe.com/index.cfm?event=bug&id=3000289

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points