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