Verification: a143cc29221c9be0

Pdf to xml converter php

Getting Started with PHPPdf

PHPPdf is available at, so you can use the composer to download this library and all dependencies. Please use the following command for a smooth installation.

Install PHPPdf via composer

$ composer require psliwa/php-pdf

You can also install it manually, download it from the GitHub repository.

PDF Files Creation from XML via PHP API

PHPPdf library allows software developers to create PDF documents by transforming an XML document inside their own PHP applications. The library supports UTF-8 encoding and has provided some free fonts for this purpose.  You can easily set page size using standard predefined values like legal, letter, A4, etc. as well can set custom page dimensions. You can also define font type, size, and styles like normal, bold, italic, bold-italic, light, or light-italic with ease.

Add Headers & Footers to PDF File

The Headers and footers are the top and bottom sections of a PDF that gives a professional look to PDF documents. To make longer PDF documents organized and easier to read developers can use Headers and footers section of a PDF document.  The PHPPdf has included support for adding headers & footers to PDF documents. It supports features like adding repetitive header/footer, insert images in a header/footer, add page numbers, and much more.

Barcode Supports in PDF Files via PHP

The PHPPdf library has included support for adding Barcodes to PDF documents using simple PHP commands. The library uses the Zend\Barcode library in order to generate barcodes. You can use different Barcode types like code128, code25, code25interleaved, code39, ean13, ean2, ean5, ean8, identcode, itf14, and many more.  You can easily set Barcode height, thin-width, checksum, thick-width & more.


When instantiating the Prince class, pass in the full path of the Prince executable to the constructor as a string argument. For example, on Linux or MacOS X:

$prince = new Prince('/usr/local/bin/prince');

On Windows, be sure to specify the path to the prince.exe file located within the Engine\bin subfolder of the Prince installation.

Conversion methods

  • convert_file
  • convert_file_to_file
  • convert_multiple_files
  • convert_string_to_file
  • convert_file_to_passthru
  • convert_multiple_files_to_passthru
  • convert_string_to_passthru