Skip to main content

Home/ interesting_sites/ Group items tagged pdf

Rss Feed Group items tagged

pagetribe .

RE: [Swftools-common] PDF2SWF and getTextSnapShot() - 0 views

  • For everyone else make sure you follow these steps: 1. Use Flash 8 or previous version (I used 6) with the -T command : pdf2swf -T 6 2. Use the -f command for full fonts : pdf2swf -f 3. Test your outputted swf with: swfdump -t filename.swf , you should see a list of DEFINETEXT statements and the corresponding text. Due to a font conflict I was seeing DEFINETEXT followed by jumbled up text on my first pdf. 4. Test your outputted swf with: swfstrings filename.swf, you should see your text and a LOT of ???????s. Again, I had garbage text when trying to convert my original PDF. If the swfdump and swfstrings tests are working, load your pdf2swf.swf into Flash. Publish it for 8. I loaded it into a movieclip on my root timeline called 'loader' : loader.loadMovie("pdf2swf_files/6new.swf"); I have a movieclip called 'searchText_mc' and have the following code for it: searchText_mc.onRelease = function() { hltext ("wonderful"); } And then the hltext is as Fabio provided. This will yellow-highlight all the occurrences of the search string: function hltext ( txt ) { trace("hltext"); var mc = _root.loader; var my_snap:TextSnapshot = mc.getTextSnapshot(); var start_pos:Number = 0; start_pos = my_snap.findText ( start_pos, txt, false ); trace("start_pos : " + start_pos); while ( start_pos > 0 ) { trace ( start_pos ); my_snap.setSelected( start_pos, start_pos + txt.length, true ); start_pos += txt.length; start_pos = my_snap.findText ( start_pos, txt, false ); } } If anyone would like some sample files give me a shout,
pagetribe .

Re: [Swftools-common] PDF2SWF and getTextSnapShot() - 0 views

  • that said, here there is my ActionScript code to highlight the text inside a PDF page. It works with Flash 8 or previous ONLY because the new Flash 9 has a different AVM interpreter (AVM2) and many things have changed. Please note: - ``txt`` is the text to search and highlight inside your page - ``mc`` points to _root.text that's where I was keeping my swf/pdf page you should change that so it references yours. Here is the code: function hltext ( txt ) { var mc = _root.text; var my_snap:TextSnapshot = mc.getTextSnapshot(); var start_pos:Number = 0; start_pos = my_snap.findText ( start_pos, txt, false ); while ( start_pos > 0 ) { trace ( start_pos ); my_snap.setSelected( start_pos, start_pos + txt.length, true ); start_pos += txt.length; start_pos = my_snap.findText ( start_pos, txt, false ); } }
  •  
    that said, here there is my ActionScript code to highlight the text inside a PDF page. It works with Flash 8 or previous ONLY because the new Flash 9 has a different AVM interpreter (AVM2) and many things have changed. Please note: - ``txt`` is the text to search and highlight inside your page - ``mc`` points to _root.text that's where I was keeping my swf/pdf page you should change that so it references yours. Here is the code: function hltext ( txt ) { var mc = _root.text; var my_snap:TextSnapshot = mc.getTextSnapshot(); var start_pos:Number = 0; start_pos = my_snap.findText ( start_pos, txt, false ); while ( start_pos > 0 ) { trace ( start_pos ); my_snap.setSelected( start_pos, start_pos + txt.length, true ); start_pos += txt.length; start_pos = my_snap.findText ( start_pos, txt, false ); } }
pagetribe .

http://www.quiss.org/swftools/pdf2swf_usage.html - 0 views

  • Embedding the SWF into a html page
  • swfdump --html flashfile.swf
pagetribe .

Abhijat Mahajan » Blog Archive » The Technology Behind Document Streaming App... - 0 views

  • The Technology Behind Document Streaming
  • Scribd uses http://www.swftools.org/ they have written open source libraries to convert pdf into flash files that can be rendered on the webbrowser.
  •  
    The Technology Behind Document Streaming
pagetribe .

Lifehacker - Top 10 Obscure Google Search Tricks - Feature - 0 views

  • Using a combination of advanced search operators that specify music files available in an Apache directory listing, you can turn Google into your personal Napster. Go ahead, try this search for Nirvana tracks: -inurl:(htm|html|php) intitle:"index of" +"last modified" +"parent directory" +description +size +(wma|mp3) "Nirvana". (Sub out Nirvana for the band you're interested in; use this one in conjunction with number 7 to find new music, too.) The same type of search recipe can find comic books as well.
1 - 12 of 12
Showing 20 items per page