HTML2PS pdf using cakephp

389 views Asked by At

The pdf file thas generated from class is not opened. I have get the message when I try to open pdf: "Adobe reader could open "test.pdf" because it is either not a support file type or because the file has been damaged (for example, it was sent as email attachment and was'nt correctly decoded).

hope you will find solution for me!

thanks,

1

There are 1 answers

0
Borislav Sabev On

The information you're giving is not where near enough for anyone to solve your problem. What I do get is that you have a problem with the ps/pdf generation, but what and where we cannot guess! So no we cannot find a solution for you since we do not know what your problem could be... Read this page on How To Ask a question.

Also why are you using this library - html2ps/html2pdf ? It is ancient already. I could propose some other solutions that are contemporary:

DomPdf
Mpdf
Tcpdf
pdftk
wkhtmltopdf

I personally recommend wkhtmltopdf. It uses the WebKit engine and then generates PDF files. If you use it, you should also not have to change much of your app since this two is a executable file that you'll have to call whit exec() (if on Linux/Unix) or COM Objects if on (Windows).