TCPDF in nubuilder incorrectly calculates the field width for Cyrillic fonts, increasing the required field width by 2 times, because of this, it was necessary to make very large fields for correct display.
The settings of TCPDF itself do not affect the report in nubuilder.
The solution is in nurunpdf.php:
Change line 718
'if($O->width - 2 > $this->PDF->GetStringWidth((utf8_encode($text))))'
on the
if($O->width - 2 > $this->PDF->GetStringWidth((utf8_encode($text)))/2)
before:
after:
I hope that this will help someone and will be included in the fixes.
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
TCPDF cyrrilic
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: TCPDF cyrrilic
Thanks for that! If that patch is applied, will the roman alphabet still be rendered correctly?
-
- Posts: 366
- Joined: Sat Apr 11, 2020 12:03 am
- Has thanked: 3 times
- Been thanked: 4 times
- Contact:
Re: TCPDF cyrrilic
This only applies to UTF-8 with free fonts.
When testing other languages and font combinations, there are no deviations ... although I'm not sure about the completeness of my tests.
)
When testing other languages and font combinations, there are no deviations ... although I'm not sure about the completeness of my tests.
