1

I'm trying to get better looking Cyrillic output with wkhtmltopdf.

Any suggestions on how I can make the wkhtmltopdf output look more like how it looks in Chrome? In particular, I'd like to get the serifs and the fine detail that the Chrome rendering has.

Note: It's ok if I have to modify the test page with additional markup. I just want to get good looking Cyrillic output from an HTML document - not necessarily the test page.

Details:

wkhtmltopdf.exe http://www.alanwood.net/unicode/cyrillic.html output.pdf

Here is how the test page looks in Chrome:

Chrome rendering

and here is how the output of wkhtmltopdf looks when viewed with Chrome's PDF viewer:

wkhtmltopdf rendering

and here is how the output of wkhtmltopdf looks when viewed with Acrobat Reader:

as rendered by acrobat reader

ErikR
  • 51,541
  • 9
  • 73
  • 124

1 Answers1

0

You can embed a high-quality Cyrillic font to get consistent output throughout. This is easily accomplished by Base64 encoding the font and including it in your CSS:

@font-face {
    font-family: 'PTSans';
    src: url(data:font/truetype;charset=utf-8;base64,AAEAAAATAQA...
}
Arman H
  • 5,488
  • 10
  • 51
  • 76