Abcpdf 9 and letter-spacing

268 Views Asked by At

I'm facing an ennoying problem. When I create a PDF from HTML, using the CSS property "letter-spacing" on some divs, browser (Firefox) and PDF (Gecko) renderings are different.

Actually, it appears that ABCPdf is adding somehow a constant to my value. For example, if I declare a 1.1px letter-spacing, ABCPdf renders a 0.8px. This "constant" depends on the font-size (here 12px).

I'm using a monospace font : Courier New, Courier, monospace

What should I check ? I'm already using FontEmbed = true, in order to have a better quality.

I can't ugrapde my version of ABCPdf.

Thanks for reading :)

1

There are 1 best solutions below

1
Moose On BEST ANSWER

I think you are better off using a style for print media like @media print {} to adjust font spacing accordingly.

ABCPdf is using Gecko 21 which is quite a bit behind current Firefox. That's probably what is causing the difference.