How to Convert Html to PDF?

How do I convert an HTML page into PDF format using PHP script?

  • I have an html page, that basically combines images and some dynamic text. Now I need a PHP script or Javascript, that will run and convert that HTML into a .pdf format so that it could be saved and printed. Thanks for a fast and tested reply.

  • Answer:

    you've gotten a few answers. the first looks like a pdf driver for you to create the pdfs offline and the second looks like some ok code to do what you want. but I have to question you as to why you feel you need a pdf to do this! printing html is built into every browser! and saving the html (and graphics) is very easy. Many sites provide an off-line zip file of their site. Firefox and others have the ability to save a page (with graphics) without any coding or special prep It seemed to me like overkill. So, I decided to answer... even though you already had some good answers.

Tawhid R at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

See the links. Testing's up to you -- depends on how fancy your page is whether this would work or not.

ey

Download pdf 995 driver from www.pdf995.com than print html page & save a file type as PDF.

vermaa2003

I would check fpdf available at: http://www.fpdf.org/ I have had decent success with it. Another option is a Pear library: http://pear.php.net/package/File_PDF

Eric B

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.