Welcome to the OzoneAsylum FaqWiki
Frequently Asked Questions
Server Side Coding
PHP

How do I dynamically create PDF files with PHP? Pages that link to <a href="https://ozoneasylum.com/backlink?for=5317" title="Pages that link to How do I dynamically create PDF files with PHP?" rel="nofollow" >How do I dynamically create PDF files with PHP?\

There a re a number of solutions to this problem:

PDFLib

This is the 'standard' way of creating PDFs through PHP and is part of the manual at:

PDF functions

and is available from there:

PDFlib – A library for generating PDF on the fly

However, the precompiled versions now requires a commercial license and there are other solutions.

Ghostscript

Capable of producing much lighter PDF files.

The basic principles involve converting your web page into a PostScript format using html2ps and then running it through Ghostscript to produce the PDF making use of the system() function.

You may want to look at the Ghostscript documentation relating to Installing Ghostscript on Unix and How to build Ghostscript from source (Unix version)

See these resources for code which should get you going:

HTML_ToPDF 2.0

pdf maker in php ... clarification

Portable Document Markup Language ( for PHP )

PDML is built on top of FPDF, and is licensed under the GPL. It's a markup language ( similar to HTML ) parsed in PHP to dynamically create some PDF files.

---------------------------
Relevant FAQs:

How do I create PDF files without Adobe Acrobat?

_____________________
Emperor


(Added by: Emperor on Mon 07-Oct-2002)

(Edited by: Emperor on Mon 07-Oct-2002)
(Edited by poi on 05-08-2004 03:51)

« BackwardsOnwards »

Show Forum Drop Down Menu