swftools-common
[Top][All Lists]
Advanced

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

Re: [Swftools-common] Re: extracting font from pdf to embed in swf


From: Yousif Masoud
Subject: Re: [Swftools-common] Re: extracting font from pdf to embed in swf
Date: Tue, 20 Apr 2010 13:11:02 +0100

On Tue, Apr 20, 2010 at 11:26 AM, DannyT <address@hidden> wrote:
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?

Cheers,


On 20 April 2010 08:51, DannyT <address@hidden> wrote:
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> wrote:
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?



--
http://danny-t.co.uk



--
http://danny-t.co.uk

Hi Danny,
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.

Thanks,
Yousif


reply via email to

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