Page 1 of 2
report Cyrillic -???
Posted: Wed Jun 03, 2020 10:46 am
by kknm
Instead of Cyrillic, question marks.
Re: report Cyrillic -???
Posted: Wed Jun 03, 2020 11:04 am
by kev1n
Google: tcpdf Cyrillic
Re: report Cyrillic -???
Posted: Thu Jun 04, 2020 9:03 am
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()"
Re: report Cyrillic -???
Posted: Thu Jun 04, 2020 9:32 am
by kev1n
Did you google the error messages?
Re: report Cyrillic -???
Posted: Thu Jun 04, 2020 9:49 am
by kknm
kev1n wrote:Did you google the error messages?
Of course, but unfortunately I did not find anything similar.
Re: report Cyrillic -???
Posted: Thu Jun 04, 2020 12:35 pm
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 !!!
Re: report Cyrillic -???
Posted: Thu Jun 04, 2020 10:18 pm
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 !!!
Re: report Cyrillic -???
Posted: Thu Jun 04, 2020 10:27 pm
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
Re: report Cyrillic -???
Posted: Thu Jun 04, 2020 10:45 pm
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
Re: report Cyrillic -???
Posted: Fri Jun 05, 2020 7:30 am
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