Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

TCPDF cyrrilic

Questions related to nuBuilder Forte Reports and the Report Builder.
Post Reply
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

TCPDF cyrrilic

Unread post by kknm »

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:
tcpdf.png
after:
tcpdf1.png
I hope that this will help someone and will be included in the fixes.
You do not have the required permissions to view the files attached to this post.
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: TCPDF cyrrilic

Unread post by kev1n »

Thanks for that! If that patch is applied, will the roman alphabet still be rendered correctly?
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: TCPDF cyrrilic

Unread post by kknm »

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. :-))
Post Reply