Closed vasiliy-komarov closed 7 years ago
Sorry.. I saw later issue but it did not help me. v. 1.5.1
Code now
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta charset="UTF-8"/>
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
<title>Title</title>
</head>
<body>
<div class="pdf-content">
<div class="pdf-label">Label</div>
<div style="font-family: 'Open Sans';"> ТЕКСТ Russian </div>
</div>
</body>
</html>
pdfGenerator.loadTemporaryFonts(Arrays.asList(new String[]{"fonts/OpenSans-Regular.ttf"}));
Thanks.
Hello. Please look, can you have any ideas what could be the problem. When generating pdf there is a problem with the symbols.
example:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
@*<meta charset="utf-8"/>*@
<title>Title</title>
</head>
<body>
<div class="pdf-content">
<div class="pdf-label">Label</div>
<div> ТЕКСТ Russian </div>
</div>
</body>
</html>
Html render = template.render();
byte[] content = pdfGenerator.toBytes(render, "http://localhost:9001");
if i use scala template without tag 'meta charset="utf-8', then word 'ТЕКСТ' have wrond encode.
if i use scala template with tag 'meta charset="utf-8', then word 'ТЕКСТ' disappear...
html it turns out right. But pdf wrong.