Sorry for the running commentary but this is driving me potty.
If the font is not embedded, the height property of the gettextruninfo call returns a decimal between 0 and 1 - does anyone know what this relates to and if it can be translated to a pixel height at all?
On 20 April 2010 08:51, DannyT <address@hidden>
Or maybe I'm missing something, i basically want to be able to highlight and/or getTextRunInfo on any text in a pdf. As we allow pdfs to be uploaded there's no guarantees we'll have the font installed to embed.
Has anyone else tackled this? I can see scribd.com
manage to do it somehow.
Any suggestions much appreciated :)
On 19 April 2010 10:59, DannyT <address@hidden>
We're working on a pdf viewer with a search function and use TextSnapshot.getTextRunInfo to highlight the search results. This is somewhat sporadic as where the PDF contains a font that is NOT in the fonts path passed in to pdf2swf then we don't have access to all of the information (corner0x, height etc.).
I've just tested a service onlinefontconverter[dot]com which allowed me to upload a pdf and then download the fonts contained within it. Does anyone know if something like this is available in swftools or of some other executable (paid or OS) we could use to extract the fonts and put them in a temp directory which is then passed to pdf2swf?
I've implemented the search function using textSnapShot and getTextRunInfo too.
When converting a document, if you use the -f flag, it will embed the fonts. I recommend using the -f flag.
Use the -F flag if you want to include a font directory.
use pdf2swf -h for more details.