Download the PHP package phppdf/phppdf without Composer

On this page you can find all versions of the php package phppdf/phppdf. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package phppdf

phppdf

phppdf is a pure PHP library for creating and processing PDF files. It covers both sides of the PDF workflow: a fluent builder API for generating documents from scratch, and a parser for reading, extracting content from, and modifying existing files.

The library maps closely to the PDF specification. Page content is built through a content stream API that exposes the full set of PDF graphics operators — paths, text, images, color spaces, gradients, transformations — while higher-level helpers (text flow, tables, barcodes, QR codes, SVG rendering) sit on top for common tasks. You get fine-grained control when you need it and convenience when you don't.

No composer dependencies are required beyond standard PHP extensions.


Requirements

Installation

Documentation

The documentation can be found here: https://phppdf.github.io/phppdf/

Quick start

Features

Building PDFs

Document structure

Fonts and text

Graphics and color

Images and media

Tables

Interactive features

Compliance and security

Marked content

Reading PDFs

Document operations

CLI


Writing PDFs

Page sizes

PdfPageSize provides named constants for standard page sizes. All values are in PDF user units (1/72 inch).

Fonts

Standard Type 1 fonts are referenced by name and require no embedding:

TrueType / OpenType fonts are fully embedded in the PDF. They support Unicode text including non-Latin scripts. Only the glyphs actually used in the document are embedded (subsetting is automatic):

Global fonts are registered once and available on every page, which is useful for headers and footers:

Text layout

TextBox measures and wraps a block of text within a fixed width. TextFlow automatically paginates overflowing text across multiple pages.

TextAlign supports Left, Centre, Right, and Justify. Hyphenation is available via TeXHyphenator:

Lists

Drawing

All drawing uses the PDF graphics model — paths, fills, strokes, and transforms. Coordinates are in user units with the origin at the bottom-left of the page.

Colors

Stream color methods (setNonStrokingRgbColor, setStrokingRgbColor, etc.) take plain float values. The Color class is used by table cells and other higher-level helpers.

Gradients

Images

PNG and JPEG images are supported via the GD extension.

Tables

SVG

A subset of SVG 1.1 is supported: basic shapes, paths, groups, transforms, and fills.

QR codes

Barcodes

Links and annotations

Outlines (bookmarks)

AcroForms

The form builder attaches interactive fields to the document. Field coordinates are in PDF page-space (origin at bottom-left, y increases upward).

Headers and footers

To inject headers/footers into an already-built PdfDocument, use PdfDocumentEditor:

Encryption

Digital signatures

PDF/A conformance

Supported levels: PdfA1b, PdfA1a, PdfA2b, PdfA2a, PdfA2u, PdfA3b, PdfA3a, PdfA3u.

Document metadata

Output targets


Reading PDFs

Open a document

Text extraction

Text extraction handles Type 0 (CID) fonts via ToUnicode CMap and simple fonts via WinAnsiEncoding. Complex custom encodings and purely glyph-substituted fonts may not extract correctly.

Image extraction

Annotation reading

Form reading and filling

Encrypted PDFs


Document operations

Merging documents

Note: encryption, digital signatures, and bookmarks from source documents are not carried over into the merged output.

Page management

PdfDocumentEditor accepts either a compiled PdfDocument or a file opened with PdfDocumentReader:

Template import

Import a page from an existing PDF as a reusable background (Form XObject):

N-up imposition

Arrange multiple source pages on a single output sheet:

PDF/A validation


CLI

The phppdf binary is installed to vendor/bin/phppdf by Composer.


License

MIT


All versions of phppdf with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
ext-dom Version *
ext-gd Version *
ext-libxml Version *
ext-mbstring Version *
ext-openssl Version *
ext-zlib Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package phppdf/phppdf contains the following files

Loading the files please wait ...