Hi,
I’m using TCPDF to generate pdf using mainly MultiCell and Image methods. It
works perfectly excepted sometime when PDF contains large number of images. I
get then the following PDF message: File doesn’t start by ‘%PDF-‘. If I remove
one or more image, PDF is correctly generated.
I have turned around this problem for a while and haven’t been able to fix it.
Any idea ?
Thanks for your help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Are you using the latest TCPDF version?
Can you provide a very simple script to reproduce the problem using (for
example) a for loop and a default image?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
you are probably triggering some PHP error.
Try to open the generated PDF file with an hex editor and read it, probably
you will notice a PHP error inside.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I’m using TCPDF to generate pdf using mainly MultiCell and Image methods. It
works perfectly excepted sometime when PDF contains large number of images. I
get then the following PDF message: File doesn’t start by ‘%PDF-‘. If I remove
one or more image, PDF is correctly generated.
I have turned around this problem for a while and haven’t been able to fix it.
Any idea ?
Thanks for your help.
Are you using the latest TCPDF version?
Can you provide a very simple script to reproduce the problem using (for
example) a for loop and a default image?
Hi,
I'm back after a while...
Yes,nicolaasuni, I use the very latest TCPDF version and it's the same...
I didn't done any progress on the problem itself but I found something that
may help:
Maybe this could help someone to get an idea.
Thanks for your help.
tcpdf_5_9_172_php4.zip
TCPDF File does not begin with '%PDF-'. ;(((
tcpdf_5_9_172_php4.zip
In browser don't opened: TCPDF File does not begin with '%PDF-'. ;(((
but Saved as .pdf, but don't open it with Reader !;((
hey anybody - where rakes???;((
you are probably triggering some PHP error.
Try to open the generated PDF file with an hex editor and read it, probably
you will notice a PHP error inside.
ok:
safe_mode Off !!!
for patch this bug set line 7797 to this value:
for get instruction how to upgrade old tcpdf 2.x to tcpdf 5.x in CMS Joomla,
follow this link >>> http://remotehelp.pp.ua/index.php?option=com_content&vie
w=article&id=88:tcpdf-v-joomla-vydaet-nekorrektnyj-pdf-dokument-pri-
soxranenii-stati-v-pdf-formate&catid=5:php-devel&Itemid=91
Seems that you are using an old TCPDF version, please upgrade.
yes - this bug to fix it in tcpdf_5_9_176_php4 version
Thanks for support!