Reputation: 1564
I am using PHP 5.0 pdf library to convert files dynamically into PDF.
I am using this reference from the official PHP website using PDF_new()
, creating its object and using PDF_set_info
and PDF_get_buffer
functions.
This works fine, but when I want to create PDF pages and writing the content inside of it, there is no reference given anywhere on how to convert an already existing page to PDF. Say a page in my folder bill.php
with CSS too needs to be converted to PDF on the fly.
Upvotes: 1
Views: 395
Reputation: 28
html2PDF is a nice library to use. Make sure you change the default language to English though. I've used it many times to create dynamic invoices with tables and divs. Works really well.
Upvotes: 1
Reputation: 2125
Refer some of the articles, which may help to improve your knowledge as well as clear some of doubt of you.
This HTML to PDF SDK may also help you.
Hope, it will help you.
Upvotes: 0
Reputation: 518
Well converting HTML to PDF is not that easy, there are several libraries out there that might fit your needs. But none has full html/css capabilities, especially not css3.
FPDF http://www.fpdf.org
TCPDF http://www.tcpdf.org
DOMPDF http://code.google.com/p/dompdf/ (this class allows you to easily convert simple layouted websites to pdf. i used this class quite often with almost no problems. sadly this library does not support converting of forms to usable input fields.)
WKHTMLTOPDF http://code.google.com/p/wkhtmltopdf/ (actually a linux package but php wrappers are existing. this gives almost full html capabilities and awesome results)
Upvotes: 1