• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 511
  • Last Modified:

Commercial solution to convert HTML to PDF


We are looking for any product that can take an exceedingly simple PHP-generated web page (text/lists/tables/graphics) and generate a PDF of that page on the server. The product must have the following:

- Work in a LAMP environemt
- Ability to generate custom top/bottom/left/right margins in the PDF file
- Handle graphics and tables, minor CSS styles (font specifications)
- Be somewhat easy to install and use or have pretty good support and documentation
- Be called from another PHP script and be able to open a page with a query string

The idea is that a user will submit some HTML as generated by an fckeditor textarea to a MySQL table.  A script will then put various elements from the table together as HTML and we then need that result to be saved on the server as a PDF.

We have looked at htmlDOC already, but I was not overly impressed with the demo at pdf-o-matic and really not impressed with the documentation.

Any other suggestions are appreciated.  Free is best, but I have secured a budget for this project and am willing to pay for a solution that meets all of the above requirements.
Jason C. Levine
Jason C. Levine
  • 2
2 Solutions
Have you looked at http://www.digitaljunkies.ca/dompdf/

Else htmlDOC is the most common used tool on linux to convert html to pdf if you have big html pages. We produce our manuals with htmlfoc from the onlinehelp. But maybe someone else has another tool. Guess for windows the list of available programs is bigger.
Jeff DarlingDeveloper AnalystCommented:
I've never tried htmlDOC, but upon seeing this question I looked into a PHP Pear solution that seems to work pretty nicely.  

Here is a sample

Jason C. LevineNo oneAuthor Commented:
Hi hernst42,

We have just started looking at dompdf...we were unaware of it until just recently.  It looks promising...

Hi jeffld,

That link looks to be a variation on fpdf.  Unfortunately, that won't work because I'd have to spend too much time converting the HTML output from the fckeditor textarea to syntax that fpdf would find acceptable.

Jason C. LevineNo oneAuthor Commented:
Thanks guys.  

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now