Convert html to pdf using tcpdf in codeigniter
Get via App Store Read this post in our app!
Codeigniter View to PDF
I have used DOMpdf, mpdf, tcpdf and is not succeeded with the output.
I am putting here everything I have tried, including HTML.
- Bad looking CSS (and not exact as per required)
- leaves 6-7 page
- brakes in pdf the records are out of page then doesn't come to next page
- makes output as small as possible, so that all records are covered in one page. (doesn't good as it is for A4 Page)
- The Borders between each rows. (in HTML there is no borders between the rows.)
I don't mind using any pdf generator library and even if we change CSS or make CSS inline, doesn't matter. The thing is I am seeking the PDF output same as displayed in view File.
Please Help me, to figure it out. Struggling since yesterday.
Take a look at wkhtmltopdf it's a shell utility to convert html to pdf using the webkit rendering engine, and qt.
This will give you a much better result than the others as it's not trying to parse the html/css in php.
Finally I got it Solved.
Thanx to everyone for trying.
Solved it in DOM Pdf only, via changing the CSS.
Edited: Make it worked through this
If anyone else is having issue.
PhantomJS uses the webkit renderer and can output to PDF.
pdfcrowd is a web service for converting HTML to PDF.