hello,
i have a problem with some pdfs (not all). when i convert them
into swfs (as 3) and try to copy / paste text using the
textsnapshot object, there are no spaces any more between the
words. the text is displayed fine, but the textsnapshot object
doesn't contain the spaces any more.
i have a pdf, the converted swf and a compilable mxml-file to
force this bug.
you can download them here:
http://www.mixotic.net/temp/Test.mxml
http://www.mixotic.net/temp/testpage.pdf
http://www.mixotic.net/temp/testpage.swf
any ideas what's the problem?
here is the source code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="horizontal" xmlns:local="*" creationComplete="start()">
<mx:Script>
<![CDATA[
private function start():void {
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener
(Event.COMPLETE, onComplete);
loader.load(new URLRequest("testpage.swf"));
}
private function onComplete(event:Event):void {
var mc:MovieClip = event.target.loader.content;
canvas.rawChildren.addChild(mc);
var snap:TextSnapshot = mc.textSnapshot;
trace(snap.getText(0, 500));
}
]]>
</mx:Script>
<mx:Canvas id="canvas"/>
</mx:Application>
cheers
felix