doodleme
(Kakibox)
1
I am trying out on the tcpdf extension - http://www.yiiframework.com/extension/tcpdf.
It works fine when i view it from linux, but always gives me error from windows, it says:“file does not begin with ‘%PDF-’”.
Anyone got any ideas for this problem ?
thank you
doodleme
(Kakibox)
2
aydin
(Aydintekin)
3
Hi,
The error is because of html layout (headers and footers) of page. We need to disable layout of page before creating pdf file.
So, add the following:
“$this->layout = ‘pdf’;”
before constructor:
$pdf = Yii::createComponent(‘application.extensions.tcpdf.ETcPdf’, ‘P’, ‘cm’, ‘A4’, true, ‘UTF-8’);
Best,
aydin
arip
(Arips4)
4
I have error message ‘not a PDF file or corrupted’ when I open pdf file…
how to solve it ?