Download the files using below link to generate html to PDF files. Download HTML2PDFNext: Extract it and you will get following folders and files Folder _class _tcpdf_5.0.002 locale Files html2pdf.class Next: Create Folder inside extension of yiiframework as "tcpdf". Copy above files and folders and paste into "tcpdf" folder. Next: html2pdf.class has contains "HTML2PDF" class. I changed html2pdf.class file name as "HTML2PDF" (For my use) Call this view from controller.Ex. In reportview.php Ex: In reportviewcontent.php I configured pdf page in reportview.php and put content separately in reportviewcontent.php
Wednesday, October 10, 2012
HTML TO PDF IN YII FRAMEWORK
by Unknown
in Chrome it gives the following error:
ReplyDelete"Failed to load PDF Document"
in Firefox its working perfecty, when downloaded , can't open in adobe reader...
any suggesion ??
Now I changed render to renderPartial in controller. Now its working in chrome and firebox
Deletelove this post! Thank you
ReplyDeleteHi balu
ReplyDeletethank you i like this post.it is very useful to me....
TCPDF ERROR: Some data has already been output, can't send PDF file
ReplyDeletewhy is this ??
any solution ??
use renderPartial() method to avoid this error
Delete