Hi wezm,
Thank you for the workaround suggestion with the CSS adjustments for Myanmar fonts.
Unfortunately, applying the provided @font-face declarations in my custom stylesheet didn’t resolve the rendering issues for the Myanmar (Burmese) script. Here’s a summary of what I’ve tried so far and some additional details on our setup:
1.
Font Usage: We are using Noto Serif Myanmar and Noto Sans Myanmar from Google Fonts, and these render correctly in the browser. However, the PDF output generated by PrinceXML still has issues, particularly with complex script features and ligatures.
2.
CSS Workaround: I applied the suggested CSS (added it directly to the stylesheets used for PDF generation) but still saw incorrect rendering.
3.
Command Details: The PDF generation is initiated through a Ruby project using the princely gem, which wraps around PrinceXML. Here’s the command that appears in the console during PDF generation:
/opt/homebrew/bin/prince --http-timeout=10 --input=html --insecure --log=/path/to/project/log/prince.log -s /path/to/project/app/assets/stylesheets/pdf.css.
4.
Prince Version: I am using the latest version of Prince(
15.4.1), but the version number hasn’t changed despite updating recently.
To illustrate the problem, I’ve attached some examples of how certain Myanmar script characters render incorrectly in PDF compared to the correct versions:
1. First example: ကြော (file: first.png)
2. Second example: မြန်မာ (file: second.png)
3. Third example: စုစည်းပြီး (file: third.png)
In each screenshot, you can see that the characters do not align properly or appear distorted in the PDF output, even though they display correctly in the web browser.
Could you please advise if it would be best to wait for your next build? If so, when might the updated version be available?
Thank you for your assistance.
- example.pdf 29.5 kB
- first.png 7.1 kB
- second.png 6.4 kB
- third.png 8.5 kB