Welcome to the nuBuilder Forums!

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

TCPDF ERROR: Some data has already been output to browser, c

Questions related to nuBuilder Forte Reports and the Report Builder.
Post Reply
miasoft
Posts: 156
Joined: Wed Dec 23, 2020 12:28 pm
Location: Russia, Volgograd
Has thanked: 32 times
Been thanked: 7 times
Contact:

TCPDF ERROR: Some data has already been output to browser, c

Unread post by miasoft »

I have two identically reports (diff only filters). Reports runs normally on my local comp (win7). On remote host (WinServer2008) the first report run OK, but the second report show ERROR and warnings:
...
Warning: array_merge(): Expected parameter 1 to be an array, null given in D:\mia\xampp\htdocs\cc\core\libs\tcpdf\include\tcpdf_fonts.php on line 2010
Warning: array_merge(): Expected parameter 1 to be an array, null given in D:\mia\xampp\htdocs\cc\core\libs\tcpdf\include\tcpdf_fonts.php on line 2010
Warning: array_map(): Expected parameter 2 to be an array, bool given in D:\mia\xampp\htdocs\cc\core\libs\tcpdf\include\tcpdf_fonts.php on line 2002
Warning: array_merge(): Expected parameter 1 to be an array, null given in D:\mia\xampp\htdocs\cc\core\libs\tcpdf\include\tcpdf_fonts.php on line 2010
Warning: Invalid argument supplied for foreach() in D:\mia\xampp\htdocs\cc\core\libs\tcpdf\tcpdf.php on line 4085
Warning: array_map(): Expected parameter 2 to be an array, bool given in D:\mia\xampp\htdocs\cc\core\libs\tcpdf\include\tcpdf_fonts.php on line 2002
Warning: Cannot modify header information - headers already sent by (output started at D:\mia\xampp\htdocs\cc\core\libs\tcpdf\include\tcpdf_fonts.php:2010) in D:\mia\xampp\htdocs\cc\core\libs\tcpdf\tcpdf.php on line 7652
TCPDF ERROR: Some data has already been output to browser, can't send PDF file
MySQL DB is the same, project's folder is the same for local and remote. What may be wrong? Why one report always run OK?
Wbr, miasoft.
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: TCPDF ERROR: Some data has already been output to browse

Unread post by kev1n »

Are you using the latest version of nurunpdf.php?

https://github.com/nuBuilder/nuBuilder- ... runpdf.php

And what's your PHP version?
miasoft
Posts: 156
Joined: Wed Dec 23, 2020 12:28 pm
Location: Russia, Volgograd
Has thanked: 32 times
Been thanked: 7 times
Contact:

Re: TCPDF ERROR: Some data has already been output to browse

Unread post by miasoft »

kev1n wrote:Are you using the latest version of nurunpdf.php?
Yes
RemoteHost: Apache/2.4.46 (Win64) OpenSSL/1.1.1h PHP/7.4.12
Local : Apache/2.4.38 (Win32) OpenSSL/1.1.1a PHP/7.3.2
Wbr, miasoft.
miasoft
Posts: 156
Joined: Wed Dec 23, 2020 12:28 pm
Location: Russia, Volgograd
Has thanked: 32 times
Been thanked: 7 times
Contact:

Re: TCPDF ERROR: Some data has already been output to browse

Unread post by miasoft »

Only this request works:

Code: Select all

SELECT
 mypppl.pppNPP,
    mypppl.NAIM,
    mypppl.PSW,
    mypppl.BAZA,
    mypppl.pppEMAIL,
    mypppl.pppUSERNAME,
    mypppl.DATECHANGE
FROM
    mypppl
WHERE
      ( mypppl.BAZA = 1)
Any filter like: mypppl.BAZA = 0, mypppl.BAZA <1, mypppl.BAZA = 2, mypppl.BAZA = '0' - I get above ERROR ! :shock:
filter: mypppl.BAZA = '1' or mypppl.NAIM LIKE 'опер%' - is OK
Wbr, miasoft.
apmuthu
Posts: 249
Joined: Sun Dec 06, 2020 6:50 am
Location: Chennai, India, Singapore

Re: TCPDF ERROR: Some data has already been output to browse

Unread post by apmuthu »

Try another set of brackets for the WHERE clause like:

Code: Select all

( ( mypppl.BAZA = 1) )
miasoft
Posts: 156
Joined: Wed Dec 23, 2020 12:28 pm
Location: Russia, Volgograd
Has thanked: 32 times
Been thanked: 7 times
Contact:

Re: TCPDF ERROR: Some data has already been output to browse

Unread post by miasoft »

It looks like the reason was in the fonts. If I used default "Helvetica" I get:
06.02_1.png
I changed font to "dejavusans" and get ERROR( I think, for long string in Detail section) and no Report.
Now I changed font for Detail to "freesans" - all is OK !
06.02_2.png
p.s. While I was figuring it out, I learned a lot, but I'm not sure what is useful :)
You do not have the required permissions to view the files attached to this post.
Wbr, miasoft.
apmuthu
Posts: 249
Joined: Sun Dec 06, 2020 6:50 am
Location: Chennai, India, Singapore

Re: TCPDF ERROR: Some data has already been output to browse

Unread post by apmuthu »

freesans is UTF-8.
Also hope that the header had a UTF-8 directive.
In the browser settings try to View=> Encoding => Unicode for the other fonts.
Post Reply