Sunday 15 May 2011

Converting pdf to vector image -


I am trying to use PDF content (math) in my webpage. I basically want to convert PDF to some vector image. Changing the SDF from PDFs does the job very well, but as the flash is not supported on every platform, I am trying to find another solution.

I read about STG, but as there is a lot in those PDFs, as a result of mathematics, I found the result of the converters is actually ugly and inaccurate.

I have thought about writing a latex again, and have thought about using it in a mathjax, in some way it is the best solution, but it is also very time consuming.

The only thing I want is converting it into a good vector image, I do not want to change the content, or something else. Besides switching to SVF or writing it again, is there any other solution?

Edit: This is the SVG / and here is the original

Your PDF Very difficult for the reasons, which are probably not clear for you.

The main problem with this is that some graphics in the document are actually drawn using custom glyph, you can see it if you copy and paste Acrobat's text. There are many unusual characters that do not serve any useful purpose. Those squares with those EES and FF in the lower part of those SVGs.

Although these characters are actually custom glyphs, such as the braces surrounding the matrix in the bottom of the page Therefore they are both very important and very specific for this document.

I tried ABCPDF .NET to convert your PDF to SVG. It has worked fine in addition to these custom glyphs below. The output was about 90KB. It looks similar to your inkcapus SVG output, but only slightly smaller (the inkcap is 160 kb).

The only way to get rid of these non-Unicode glyphs is to vector the text. I used ABCPDF and enjoyed output in SVG. But ... vectorized text is bigger and SVG is not a particularly efficient medium, the output was approximately 1 Mb! Zipped it goes down halfway, but it still is not as close to the original PDF as efficient.

The problem I am seeing will be universal, which you use. These custom characters are always going to be problematic whether you output to SVG, SWF, HTML canvas, VML, or indeed any vector format.

So what would I suggest? Well-clear vector format which is widely used on the web ... PDF!

I know that this is not enough for you, but I think it is a realistic solution given the above obstacles. : -)

No comments:

Post a Comment