Why do some files display fractional white lines?

When converting PDF to HTML5 or SVG, you may notice a very small subset of files show fractional white lines in the generated output. Sometimes the white lines can be seen to a lesser extent in the original PDF file, and sometimes they may appear or disappear when zooming in or out.


This happens when the PDF file uses clipping with very tight tolerances, and is typically seen in files that split images into smaller tiles. It is more commonly seen in files produced by InDesign, though we are not familiar with why images are sometimes split this way.

These files rely on a feature of PDF called Scan Conversion. Scan Conversion is a process controlled by the renderer which determines how to paint a pixel when content only partially overlaps it.

The PDF specification calls for very forgiving scan conversion to fully paint a pixel even when content only partially overlaps it. However converting to HTML and SVG means that we rely on the web browsers to render the content which unfortunately means we do not have any control over this process.

It is for this reason that fractional white lines may be more prominent when converting PDF to HTML5 or SVG. Sometimes when translating between languages there is no direct translation for a given word or phrase, and this is one such instance.

In the 2020.07 release we made a tradeoff. Instead of clipping the images in advance (where we have more control over sub-pixel rendering), we moved the image clipping to SVG. This made fractional white lines more prominent in exchange for an 80% reduction of image sizes. Learn more about it here.

Please let us know if you rely on the old solution so that we know if we should continue to support it with a configuration option.