[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swftools-common] issue with pdf2swf bounding box rectangles in the resu

From: Evgeny Chesnokov
Subject: [Swftools-common] issue with pdf2swf bounding box rectangles in the resulting swf on Linux
Date: Thu, 14 Aug 2014 18:00:29 +0700

Hi all,

I did not find an official swftools bugtracker so I assume this is the best place to report a bug.
Tested x64 pdf2swf under CentOS 6.4 and Ubuntu, both 0.9.1 and 0.9.2 versions.
The bounding box data for the characters generated in SWF is provided inverted (that is - rectangles with a negative height, from bottom to the top). This behaviour does not reproduce on Windows. This is inconsistent behaviour.

To observe it, we run the conversion of any pdf document and inspect the bounding box info.

To extract the bounding box info for a character of data, one must call:

var snap:TextSnapshot = mc.textSnapshot; //where mc is the page swf
var runInfo:Array = snap.getTextRunInfo( startIndex, endIndex ); //where startIndex and endIndex are the indices of the start and stop characters for whichever text you're selecting

var shapeObj:Object = runInfo[i]; //Select the character whose bounding box you want to examine
var topY:Number = Number( shapeObj['corner0y']); //Extract the top corner of the character bounding box's y coordinate
var bottomY:Number = Number( shapeObj['corner1y']);//Extract the bottom left corner y value

Now you can compare y values and, normally, the top y should be LESS than the lower y, but in Linux installations this appears to be flipped.

Is this a bug or a feature? Is there any chance this will be fixed in the future?

Thanks in advance,

Evgeny Chesnokov,

Software Developer,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]