Skip to main content

HTML and SVG export

The "Toolbox" web service with the image and transcribe operations allows the creation of an HTML or SVG image of a PDF document.

API {REST}: toolbox

The operations should convert PDF content to the target format as losslessly and precisely as possible.

caution

Particularly when mapping color gradients, patterns and shading, this can always result in quality losses and minor inaccuracies in positioning. The translation of the various fonts is also generally error-prone, especially if a substitute font has to be used (e.g. for the PDF-14 standard fonts). The result should therefore be sighted and checked for deviations if possible!

Operation "transcribe"

The transcribe operation can be used to convert one or more pages of the PDF into a coherent HTML document. Path drawing instructions are translated into corresponding SVG drawing paths, fonts and raster graphics are extracted if possible and embedded directly into the resulting document, and the frames and dimensions of the pages are mapped using appropriate containers.

Texts are rendered using the determined fonts whenever possible, so that textual content is selectable and preserved.

For the representation of more complex drawing operations such as color gradients, patterns and shading, raster graphics are always generated, which can lead to inaccuracies and quality losses.

Limitations
  • The transcribe operation currently does not support the export of non-Unicode capable fonts. Only fonts whose glyphs can be mapped to Unicode can be displayed correctly, text content without Unicode mapping will be missing in the resulting document. This mainly concerns Type1 and Type3 Postscript fonts and some CFF fonts, if they do not have a corresponding table.
  • All specifications regarding the resolution of the result refer primarily and significantly to the raster graphics used or to be generated.

Operation "image"

The SVG export of the image operation behaves very similarly to the transcribe operation. Path drawing instructions are transferred to the SVG as precisely as possible, more complex drawing operations such as color gradients, patterns and the like are transferred to raster graphics.

Limitations
  • Fonts, however, will not be translated or embedded in any case - contained textual content will be transferred directly into glyph character paths and will thus definitely be included in the result. However, both the selectability of the glyphs and their Unicode mapping are lost.