Welcome to the nuBuilder Forums!

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

report Cyrillic -???

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

report Cyrillic -???

Unread post by kknm »

Instead of Cyrillic, question marks.
kev1n
nuBuilder Team
Posts: 4416
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 74 times
Been thanked: 472 times
Contact:

Re: report Cyrillic -???

Unread post by kev1n »

Google: tcpdf Cyrillic
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: report Cyrillic -???

Unread post by kknm »

kev1n wrote:Google: tcpdf Cyrillic
The problem was wider than I expected.
Cyrillic is normally displayed in reports, with the exception of words with a length of more than 10 Cyrillic characters. At such a word an error appears.
Warning: array_map(): Expected parameter 2 to be an array, bool given in /var/www/report/tcpdf/include/tcpdf_fonts.php on line 2003

Warning: array_merge(): Expected parameter 2 to be an array, null given in /var/www/report/tcpdf/include/tcpdf_fonts.php on line 2011

Warning: Invalid argument supplied for foreach() in /var/www/report/tcpdf/tcpdf.php on line 4085

Warning: array_merge(): Expected parameter 1 to be an array, null given in /var/www/report/tcpdf/include/tcpdf_fonts.php on line 2011
This is a fresh tcpdf error
Warning: array_map(): Expected parameter 2 to be an array, bool given in /var/www/raport/tcpdf/include/tcpdf_fonts.php on line 2002

Warning: array_fill_keys() expects parameter 1 to be array, null given in /var/www/raport/tcpdf/include/tcpdf_fonts.php on line 2007

Fatal error: Uncaught Error: Unsupported operand types in /var/www/raport/tcpdf/include/tcpdf_fonts.php:2007 Stack trace: #0 /var/www/raport/tcpdf/tcpdf.php(4033): TCPDF_FONTS::UTF8StringToArray() #1 /var/www/raport/nurunpdf.php(678): TCPDF->GetStringWidth() #2 /var/www/raport/nurunpdf.php(624): nuSECTION->getOneRow() #3 /var/www/raport/nurunpdf.php(370): nuSECTION->getObjectRows() #4 /var/www/raport/nurunpdf.php(320): nuSECTION->setObjectLines() #5 /var/www/raport/nurunpdf.php(193): nuSECTION->buildSection() #6 /var/www/raport/nurunpdf.php(48): nuBuildReport() #7 {main} thrown in /var/www/raport/tcpdf/include/tcpdf_fonts.php on line 2007
This is nuBuilder tcpdf error
In both cases, there is "UTF8StringToArray()" and "GetStringWidth()"
kev1n
nuBuilder Team
Posts: 4416
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 74 times
Been thanked: 472 times
Contact:

Re: report Cyrillic -???

Unread post by kev1n »

Did you google the error messages?
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: report Cyrillic -???

Unread post by kknm »

kev1n wrote:Did you google the error messages?
Of course, but unfortunately I did not find anything similar.
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: report Cyrillic -???

Unread post by kknm »

kev1n wrote:Did you google the error messages?
I did an example from the site https://tcpdf.org/examples/example_008/ with long Cyrillic words - everything is OK there, - the problem is in nuBuilder !!!
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: report Cyrillic -???

Unread post by kknm »

I made a report in WinXP - from the entire long Cyrillic word, only the first letter is printed, both in labels and in fields.
Tcpdf freshest - v.6,3,5
The problem is observed on all versions of tcpdf.
long.PNG
I have done (Ubuntu and WinXP) examples from the tcpdf folder - pdf is formed correctly and displays all long words. I am sure that the error is in the nurunpdf.php file.
Apparently therefore, I can not find a similar problem in google. Help !!!
You do not have the required permissions to view the files attached to this post.
Janusz
nuBuilder Team
Posts: 508
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 10 times
Been thanked: 18 times

Re: report Cyrillic -???

Unread post by Janusz »

Hi,
Try to replace TCPDF to the latest version in nuBuilder folder. Here you can find how I did it:
https://forums.nubuilder.cloud/viewtopic. ... pdf#p20035
I had some problems with Polish letters - to solve the proper generation of reports I had to replace the TCPDF and use specific fonts.
Additionally to reduce the pdf size you can adjust as following:
https://forums.nubuilder.cloud/viewtopic. ... =10#p19431
If you like nuBuilder, please leave a review on SourceForge
Janusz
nuBuilder Team
Posts: 508
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 10 times
Been thanked: 18 times

Re: report Cyrillic -???

Unread post by Janusz »

just did the test on my settings and looks OK
Przechwytywanie.JPG
in my case I have to use dejavusans or freesans fonts - others are not ok with Polish letters - the above report was generated with freesans
You do not have the required permissions to view the files attached to this post.
If you like nuBuilder, please leave a review on SourceForge
kknm
Posts: 366
Joined: Sat Apr 11, 2020 12:03 am
Has thanked: 3 times
Been thanked: 4 times
Contact:

Re: report Cyrillic -???

Unread post by kknm »

[quote="Janusz"]just did the test on my settings and looks OK
Thank you for your attention to my problem, but I did not find the answer to my question in your description.

I have the latest version of tcpdf 6.3.5, I use fonts from the dejavu and free family. Correctly generate pdf-file without the participation of nuBuilder from the folder / nuBuilder / tcpdf.

In what encoding did you form your example? I use utf-8, which is 2 times longer than the latin - this is where the problem lies
Post Reply