Working with PDFs in PHP usually means collecting libraries. One writes documents but can’t read them. Another reads but can’t write. A third renders HTML. A fourth merges.
Pop PDF does all of it — through one object model, one API, one dependency.
A one-page PDF is a few lines. Or hand it HTML and let it do the work for you.
$doc = new Pop\Pdf\Document(); $page = $doc->createPage(Page::LETTER); $page->addText( 'Hello', Font::ARIAL, x: 50, y: 742 );
An imported PDF comes back as the same objects you would have built yourself.
$doc = Pdf::importFromFile( 'contract.pdf', pages: [2, 4, 6] ); Pdf::writeToFile($doc, 'out.pdf');
Native text extraction, embedded fonts included — and a way to spot a scan before you read it.
$text = Pdf::extractTextFromFile( 'report.pdf', pages: [1, 2, 3] ); Pdf::isImageOnlyDocument('scan.pdf');
PHP 8.4+. Optional extensions: gd, imagick, zlib, mbstring.