report Cyrillic -???

Questions related to nuBuilder Forte Reports and the Report Builder.

report Cyrillic -???

Postby kknm » Wed Jun 03, 2020 6:16 pm

Instead of Cyrillic, question marks.
kknm
 
Posts: 139
Joined: Sat Apr 11, 2020 7:33 am

Re: report Cyrillic -???

Postby kev1n » Wed Jun 03, 2020 6:34 pm

Google: tcpdf Cyrillic
kev1n
 
Posts: 784
Joined: Mon Oct 15, 2018 2:13 am

Re: report Cyrillic -???

Postby kknm » Thu Jun 04, 2020 4:33 pm

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()"
kknm
 
Posts: 139
Joined: Sat Apr 11, 2020 7:33 am

Re: report Cyrillic -???

Postby kev1n » Thu Jun 04, 2020 5:02 pm

Did you google the error messages?
kev1n
 
Posts: 784
Joined: Mon Oct 15, 2018 2:13 am

Re: report Cyrillic -???

Postby kknm » Thu Jun 04, 2020 5:19 pm

kev1n wrote:Did you google the error messages?

Of course, but unfortunately I did not find anything similar.
kknm
 
Posts: 139
Joined: Sat Apr 11, 2020 7:33 am

Re: report Cyrillic -???

Postby kknm » Thu Jun 04, 2020 8:05 pm

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: 139
Joined: Sat Apr 11, 2020 7:33 am

Re: report Cyrillic -???

Postby kknm » Fri Jun 05, 2020 5:48 am

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
long.PNG (8.88 KiB) Viewed 196 times

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 !!!
kknm
 
Posts: 139
Joined: Sat Apr 11, 2020 7:33 am

Re: report Cyrillic -???

Postby Janusz » Fri Jun 05, 2020 5:57 am

Hi,
Try to replace TCPDF to the latest version in nuBuilder folder. Here you can find how I did it:
https://forums.nubuilder.com/viewtopic.php?f=21&t=10157&p=20035&hilit=tcpdf#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.com/viewtopic.php?f=21&t=9905&start=10#p19431
Janusz
 
Posts: 310
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Re: report Cyrillic -???

Postby Janusz » Fri Jun 05, 2020 6:15 am

just did the test on my settings and looks OK
Przechwytywanie.JPG
Przechwytywanie.JPG (86.38 KiB) Viewed 194 times

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
Janusz
 
Posts: 310
Joined: Fri Dec 28, 2018 10:11 pm
Location: Krakow, Poland

Re: report Cyrillic -???

Postby kknm » Fri Jun 05, 2020 3:00 pm

[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
kknm
 
Posts: 139
Joined: Sat Apr 11, 2020 7:33 am

Next

Return to Reports



cron