Link

How is text kerning handled?

Kerning is a commonly used PDF feature that allows text glyphs to be individually positioned within a line of text.

PDF Text Kerning

SVG supports kerning and PDF files that use kerning should display well when converted using BuildVu-SVG.

HTML on the other hand does not support kerning, posing something of a challenge for BuildVu-HTML. Due to the abundant use of kerning inside PDF files, we have decided that creating a new text element to individually position text whenever kerning is encountered is not a viable solution as it would excessively bloat the output, creating larger files that are slow to load.

Instead, BuildVu-HTML adopts a flexible approach whereby small amounts of kerning are converted into letter-spacing, in effect averaging the kerning across the whole line of text. In the majority of files, the difference is imperceptible, and in exchange, smaller, more highly optimized HTML is created.

In rare cases, other content within the PDF file may rely on the exact positioning of glyphs. We sometimes see this where an outline is drawn around the text using shapes to give the text a more bold appearance. In these cases, it may become obvious that the exact positioning of the text has not been retained. This is a trade-off of converting to HTML, and where higher precision of glyph positioning is required we recommend converting to SVG using BuildVu-SVG.


What's included in your BuildVu trial?

  • Access to download the SDK and run it locally.
  • Access to the cloud trial to convert documents in the IDR cloud.
  • Access to the Docker image to set up your own trial server in the cloud.
  • Communicate with IDR developers to ask questions & get expert advice.
  • Plenty of time to experiment and build a proof of concept.
  • Over 100 articles to help you get started and learn about BuildVu.
  • An exceptional PDF to HTML converter that took over 20 years to build!

Start Your Free Trial