I am developing PDF to e-book converter which will run on a server.
I need to programmatically extract embedded fonts from PDF file to finish the project. Now I am able to extract images and text, but to display content in the Flash Player precisely I need the fonts to be extracted from PDF and compiled to SWF to be loaded by Flex application at run time.
I am wondering if it's possible, as such tool as pdf2swf.exe from SWFTools is able to do this. I have decompiled the swf file produced by the tool and there were fonts embedded.
The extracted fonts will be used for displaying the same content from PDF file only, just in Flash player. So i think it will not be any rights violation? Moreover, people who will use the converter have all rights for the PDF files content.
So I see next workflow: 1. Call pdf2swf.exe to produce SWF file with fonts embedded; 2. Call some tool (Which one?) to parse previous SWF to SWFs with separate fonts. 3. Load the SWFs with fonts to Flex application at run time to correctly display content.
It would be great if there is some tool to extract fonts from PDF directly to SWFs.