Previous Next
Tags Xml2Pdf
Xml2Pdf documentation

Xml2Pdf documentation

Table of Contents

Guillaume Luchet, guillaume@geelweb.org
Copyright © 2006, Guillaume Luchet
BSD License

Xml2Pdf documentation

Xml2Pdf is a library to convert XML file to PDF document. The XML content is parsed using the PHP XML parser functions, then the PDF is build using FPDF.

BSD License

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

* Neither the name of the Xml2Pdf nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Installation instructions

Xml2Pdf is easy to install and use. You can use it with your web-server or directly on command-line.

Web usage instruction

Put the xml2pdf directory into a directory accessible by your web-server. That's all.

Now you can make pdf in your php script using :

  1. include('Xml2Pdf.php');
  2. $obj new Xml2Pdf('myXmlFil.xml');
  3. $pdf $obj->render();
  4. $pdf->Output();


Command-line usage instruction

To use Xml2Pdf as a command-line interface, you need to install PHP version 5.1.0 or greater.

*IMPORTANT* any version of PHP below 5.1.0 will not work with version 0.6.10.8 of Xml2Pfd!!!

Windows

You need the cli version of PHP (php-cli.exe or cli/php.exe in 5.1.0+). Either run Xml2Pdf from the directory that PHP resides in, or put php.exe in your DOS PATH enviroment variable.

The simplest usage of Xml2Pdf is: C:\>php.exe "C:\Path\To\Xml2Pdf\xml2pdf" -F myFile.xml

Unix

Make sure that the cgi/cli version of PHP is in your path.

The simplest usage of Xml2Pdf is: xml2pdf -f myFile.xml


Previous Next
Tags Xml2Pdf

Documentation generated on Wed, 11 Oct 2006 22:27:05 +0200 by phpDocumentor 1.3.0