How to work with PDF files in PHP?

In your application you will often need to create PDF files. For creating PDF files usage of PHP's PDF functions is advised.

Often this is not enough and you need extra functionalities on top of PHP PDF functions. PHP libraries and resources to check out:

  • FPDF - Open Source PHP class for generating PDF documents
  • FPDI - Collection of PHP classes to read pages from PDF
  • PDF libraries on packagist - PDF libraries on packagist
  • PHPPdf - Pdf and graphic files generator library written in php
  • TCPDF - Open Source PHP Class for generating PDF documents
  • Dompdf - Open Source HTML layout and rendering engine written in PHP

Found a typo? Something wrong with this content?

Just fork and edit it.

Content of this work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license. Code snippets in examples are published under the CC0 1.0 Universal (CC0 1.0). Thanks to all contributors.