innoveit / play2-pdf

A PDF module for Play Framework 2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with cyrillic

kostap13 opened this issue · comments

Hello.
Cyrillic chars are broken if don't set meta tag utf-8. And don't renders if set meta tag.

thanks.

Which version do you use? Can you paste some example?

1.5.0
return pdfGenerator.ok(document.render("Your new application is ready."), "http://localhost:9000");

@(message: String)

<html>
<head>
<title>PDF Sample</title>
<meta charset="UTF-8">
</head>
<body>
<div>
<span style="font-size: 9px;">
<!-- don't render -->
Этот текст не отображается
</span>
</div>
<h1>Свидетельство</h1>
Image: <img src="/public/images/favicon.png"/><br/>
Hello world! <br/>
@message <br/>
</body>
</html>


<html>
<head>
<title>PDF Sample</title>
</head>
<body>
<div>
<span style="font-size: 9px;">
<!-- Broken chars -->
Битые символы.
</span>
</div>
<h1>Свидетельство</h1>
Image: <img src="/public/images/favicon.png"/><br/>
Hello world! <br/>
@message <br/>
</body>
</html>

Hi, you have to use a font that support Cyrillic, I update the sample project with an example.