Q: We used the demo version of pdf2svg ('pdftron.PDF.Convert.ToSvg()')
to generate a large variety of different files using the embedded font
and image option. Fidelity of text is very important to our client's
application. The attached image shows the original PDF and the
results from the most current versions of the major browsers. My
1. The best was Chrome. It appears to render everything quite
precisely to the original PDF file.
2. Safari rendered the images and fonts properly. The only problem was
the kerning (spacing of letters within words) that was not always
3. Opera was perfect with the text but sometimes it did not display
the images embedded in the SVG.
4. Firefox and IE do not appear to render the embedded fonts. I don't
know if there's a way around that or if it's just not supported.
I am wondering if you have been conducting any of your own tests and
are aware of these issues and if you have any advice or workarounds
for improving the results.
A: We tested various SVG viewers not long ago and found most browser
implementations to be fairly inconsistent. Even the best
implementation on your list does not come even close to full SVG
support not to mention the issues related to inconsitencies, low-
performance on specific feaures, complex documents etc
Unfortunately it will probably take some time until the SVG
specification is properly implemented by _all browsers.
In the last build of pdf2svg we tried to reconcile some of the
differences between latest crop of viewers, but in some cases (e.g.
missing support for SVG fonts) where are no simple workarounds. A
potential solution would be to use PDFNet to convert glyphs to paths
(referenced by id) prior to SVG conversion. Since basic path support
is relatively stable across different browsers the files would most
likley render (more or less) consistenly. The main disadvantage is
that you would loose text selection and copy/paste capability.
Another option (which in not based on SVG) would be to use SilverDox
(http://www.pdftron.com/silverdox/samplecode.html). A solution based
on SilverDox would work reliably on both Windows and Mac and across
different browsers (IE, Firefox, Chrome, and Safari).