innoveit / play2-pdf

A PDF module for Play Framework 2
MIT License
77 stars 22 forks source link

Problem with cyrillic #14

Closed kostap13 closed 8 years ago

kostap13 commented 8 years ago

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

thanks.

marcosinigaglia commented 8 years ago

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

kostap13 commented 8 years ago

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>

marcosinigaglia commented 8 years ago

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