Re: [Swftools-common] Text selection fails
On Mon, 07 Dec 2009 03:08:14 +0530, Matthias Kramm matth...@scribd.com wrote: Try pdf2swf -f -T9 file.pdf -o file.swf Atul K. On Tue, Dec 01, 2009 at 02:05:25PM -0600, Sean Laurent s...@studyblue.com wrote: I'm using pdf2swf 0.9.0 and I can successfully convert and display a large variety of PDFs. However, I can't seem to select any text: Try converting the file with the -f option: pdf2swf -f file.pdf -o file.swf This should probably be a FAQ item. Matthias -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Re: [Swftools-common] Text selection fails
On Mon, Dec 07, 2009 at 11:44:26AM +0530, Rahul Mahurkar rahulmahur...@gmail.com wrote: But, I'm facing a bit weird problem. I'm able to highlighted text most of the times but sometimes few characters just refuse to get highlighted. I use: pdf2swf -f -T9 file.pdf -o out.swf Is anyone else also facing this issue? Any thoughts how to address this? Try the development snapshot, or better yet, the git version. I fixed a lot of issues with text selection lately. Matthias
Re: [Swftools-common] Text selection fails
Thanks. That solved my first problem. Now text selection works in that I can call setSelected() and getSelectedText() returns the selection as expected. Woo woo! Unfortunately, highlighting is not working. I can select text just fine, but the expected border doesn't appear around the selected text. I'm convert from pdf using the following options: pdf2swf -T9 -f -G -o file.swf file.pdf I've tried it with and without flattening (-G). Neither seems to make a difference. My Flex code looks something like the following: private function searchDocument(searchText:String, startPos:int = 0) : void { var matchLocation:int = _mainClip.textSnapshot.findText(startPos, searchText, false); var clip:MovieClip = ldr.content as MovieClip; var text:TextSnapshot = clip.textSnapshot; text.setSelected(matchLocation, matchLocation + searchText.length, true); text.setSelectColor(0xffcc33); trace(selectedText: + text.getSelectedText(false)); } I've tried leaving the selection color as the default (0x00) or changing it around, but no luck. The trace lines shows me that it's finding and selecting matches. But nothing gets highlighted. :( Any suggestions? -Sean On Dec 6, 2009, at 3:38 PM, Matthias Kramm wrote: On Tue, Dec 01, 2009 at 02:05:25PM -0600, Sean Laurent s...@studyblue.com wrote: I'm using pdf2swf 0.9.0 and I can successfully convert and display a large variety of PDFs. However, I can't seem to select any text: Try converting the file with the -f option: pdf2swf -f file.pdf -o file.swf This should probably be a FAQ item. Matthias
[Swftools-common] Text selection fails
I'm using pdf2swf 0.9.0 and I can successfully convert and display a large variety of PDFs. However, I can't seem to select any text: ---snip--- var clip:MovieClip = ldr.content as MovieClip; clip.textSnapshot.setSelected(10, 20, true); trace(selectedText: + clip.textSnapshot.getSelectedText(false)); ---snip--- The trace output from the snippet above is always empty - nothing is selected. I've tried all kinds of variations, but nothing works. Any suggestions would be greatly appreciated. -Sean