Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PDFs Have Suddenly Stopped Displaying
03-29-2017, 03:07 AM,
#11
RE: PDFs Have Suddenly Stopped Displaying
I suspect there is some white space being output.

It may be that you are hitting a problem I have warned about for some time. Some developers have taken to leaving blank lines at the end if scripts after the final ?>

This means that when a script is run a blank line is output meaning that the error you mention will be output. My guess if it is occurring in each pdf output then it is a script that is common to all of them. I don't have the code in front of me but I would check class.pdf.php sessions.inc and the ConnectDB scripts.

Tim
Reply
03-31-2017, 02:23 AM,
#12
RE: PDFs Have Suddenly Stopped Displaying
This is so frustrating. Is there a script I can include to output where the errors are? I can't print any pdf reports on anything at the moment.
Reply
03-31-2017, 02:34 AM,
#13
RE: PDFs Have Suddenly Stopped Displaying
Did you try removing those blank lines in the scripts I mentioned?

Tim
Reply
03-31-2017, 03:04 AM,
#14
RE: PDFs Have Suddenly Stopped Displaying
I have checked class.pdf.php, session.php, ConnectDB.inc, ConnectDB_mysql.inc, ConnectDB_mysqli.inc, and ConnectDB_postgres.inc and have not found these extra lines after the ?> that you speak of.
Reply
03-31-2017, 03:15 AM,
#15
RE: PDFs Have Suddenly Stopped Displaying
(03-31-2017, 03:04 AM)sunshinelock Wrote: I have checked class.pdf.php, session.php, ConnectDB.inc, ConnectDB_mysql.inc, ConnectDB_mysqli.inc, and ConnectDB_postgres.inc and have not found these extra lines after the ?> that you speak of.

Here is the last few lines of a just downloaded version of includes/ConnectDB_mysqli.inc showing a blank line at the end.

Tim
   
Reply
03-31-2017, 03:22 AM, (This post was last modified: 03-31-2017, 03:31 AM by sunshinelock.)
#16
RE: PDFs Have Suddenly Stopped Displaying
My ConnectDB_mysqli.inc "ConnectDB_mysqli.inc 7653 2016-10-24 01:18:52Z rchacon" ends at line 237 with nothing past the ?>

I just did a search for "?> " in my files and came up with these that follow. I manually checked my config.php on my server, CounterReturns.php, the install/index.php, and the first few .html files (not all the html files) and couldn't find any spaces after the closing line.

Strings Table


Search for

?>


Results Table

Name
Size
Total number occurrences

config.distrib.php
5,535 bytes
1

CounterReturns.php
79.06 KiB
2

index.php
65.18 KiB
3

ReportsFilter.html
5,332 bytes
1

ReportsID.html
2,359 bytes
2

ReportsPageSetup.html
15.50 KiB
24

ReportsPageUpdate.html
13.43 KiB
25

TplFrmCBlk.html
10.62 KiB
12

TplFrmCDta.html
9,158 bytes
17

TplFrmData.html
11.30 KiB
17

TplFrmLine.html
4,820 bytes
6

TplFrmLine.html
4,851 bytes
6

TplFrmPgNum.html
8,011 bytes
16

TplFrmRect.html
5,812 bytes
10

TplFrmTbl.html
12.45 KiB
15


TplFrmTBlk.html
12.96 KiB
12


TplFrmText.html
8,769 bytes
16


TplFrmTtl.html
9,668 bytes
17



That being said, I just tried searching for the new line after the closing tag, but my search software is limited that way. I am using kfilereplace on an old ubuntu version.
Reply
03-31-2017, 03:50 AM,
#17
RE: PDFs Have Suddenly Stopped Displaying
Well the error you are getting:

<strong>TCPDF ERROR: </strong>Some data has already been output, can't send PDF file

means that some characters have been output to the browser before the PDF is printed. As the characters are not visible then they must be white space. The easiest way white space creeps in like this is if a blank line appears after the final PHP closing tag, so I am guessing you must have something like that in your scripts. Your hosting company probably changed a setting in your php.ini that is causing this. (Probably output buffering settings if asked to guess)

Take a script that fails, list out all the includes in that script and then check all those files for any white space after the closing tag.

Tim
Reply
03-31-2017, 03:57 AM, (This post was last modified: 03-31-2017, 05:11 AM by sunshinelock.)
#18
RE: PDFs Have Suddenly Stopped Displaying
I went into an old version of webERP sitting on my server. 3.11 and I can print invoices from there.

But here's a glitch, and I've been living with it for years now. In my 3.11, I can't print counter sales as pdf unless the "Print EDI Transactions" is selected to "Print PDF EDI Transactions Too". This only happens with counter sales.

I cannot get pdf invoices to print either way in the 4.13 sitting on my server. And I cannot get customer statements to print more than a blank page on 3.11. I did a "Reorder Level" report on 3.11 and got several dozen blank pages with my company name in the lower left corner on each page.
(03-31-2017, 03:50 AM)falkoner Wrote: Well the error you are getting:

<strong>TCPDF ERROR: </strong>Some data has already been output, can't send PDF file

means that some characters have been output to the browser before the PDF is printed. As the characters are not visible then they must be white space. The easiest way white space creeps in like this is if a blank line appears after the final PHP closing tag, so I am guessing you must have something like that in your scripts. Your hosting company probably changed a setting in your php.ini that is causing this. (Probably output buffering settings if asked to guess)

Take a script that fails, list out all the includes in that script and then check all those files for any white space after the closing tag.

Tim

Is there a recommended size for the output buffering? I'm going to send a request to my host.
Reply
04-04-2017, 10:46 PM,
#19
RE: PDFs Have Suddenly Stopped Displaying
This is really starting to suck. I can't print my receivables because everything depends on pdf as a report. No option to print to an html page.

I contacted my host. This is their reply:

QUOTE

if it was a php mem cache issue, I would see an error
I just do not

the only memory option in php55 is the one I raised last week from 128M to 256M
I just raised it up

memory_limit = 512M - when I click on the "print pdf'

sorry to say , I see "process request" then blank page

is this PDF module up to date?
any specs / requirements to run PDF we need to enable for php55 or increase another setting ?

END QUOTE
Reply
04-05-2017, 12:30 AM,
#20
RE: PDFs Have Suddenly Stopped Displaying
You are looking for something more complex than you need to. The meaning of the error "TCPDF ERROR: Some data has already been output, can't send PDF file" is that some characters have been output to the browser before webERP tries to output the PDF files. As there is no visible characters that tells me it is white space. I have told you previously the common cause of white space getting output.

I suggested:
"Take a script that fails, list out all the includes in that script and then check all those files for any white space after the closing tag."
Did you try this?

Tim
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)