Download the PHP package jamesthomsen/mightypdf without Composer

On this page you can find all versions of the php package jamesthomsen/mightypdf. 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 mightypdf

MightyPDF

A from-scratch PDF library for PHP: raw PDF assembly plus a content layer for text, drawing, images, SVG, barcodes and AcroForm fields, a layout layer with cells and tables on top of it — and a reader that can open an existing PDF and edit it in place.

Requires PHP 8.3+, ext-iconv, ext-openssl, and ext-zlib.

Installation

Quick start

Runnable, more elaborate versions of every example below live in examples/ — run any of them with php examples/0X-name.php; output is written to examples/output/.

File Demonstrates
01-blank-document.php Minimal document, custom page size
02-text-and-fonts.php All 14 standard fonts, measuring text
03-lines-and-shapes.php Lines, filled/stroked rectangles, method chaining
04-images.php JPEG, PNG, GIF
05-svg.php SVG vector graphics
06-form-fields.php Text fields and checkboxes
07-combined-document.php Everything together, across multiple pages
08-editing-existing-pdf.php Opening a PDF with PdfEditor and editing an object (page rotation)
09-encrypting-a-document.php AES-256 encryption with Document::encrypt() and Permissions
10-filling-an-existing-form.php Filling an existing PDF's form fields with FormFiller
11-stamping-an-existing-page.php Stamping a page with PageOverlay, plus adding a field to an existing form
12-document-metadata.php Setting Title/Author/Subject/Keywords/Creator/Producer/CreationDate
13-merging-documents.php Combining pages from multiple PDFs into one with PdfMerger
14-embedding-a-font.php Embedding a TrueType or OpenType font, and pointing a form field at one
15-links-and-bookmarks.php Links out of and inside a document, and a bookmark tree
16-a-report-with-the-layout-layer.php A business report through Flow: cells, a table, a chart, a footer on every page
17-shapes-transforms-and-transparency.php Paths, ellipses, polygons, dashes, and scoped transforms, clips and alpha
18-a-table-that-breaks-across-pages.php Table: wrapping cells, a repeating header, colspans, striping
19-barcodes-and-qr-codes.php Code 39, Code 128, EAN-13, UPC-A, and QR at all four levels
20-print-colours.php CMYK, a spot colour at five tints, and a dieline separation
21-attachments-and-viewer-preferences.php An invoice carrying its own XML, viewer preferences, a rotated page
24-a-print-ready-flyer-with-bleed.php Bleed and trim boxes, artwork off the edge, margins from the cut
25-form-data-in-and-out.php Exporting a filled form as XFDF and JSON, and importing both back
26-flattening-a-form-and-dropping-the-history.php Inspecting a form's fields and where they sit, then flattening it and saving one revision

Core concepts

Document is the top-level object. It owns every page and every indirect object in the file, and is responsible for producing final PDF bytes.

PageBuilder is where you actually draw. Each page gets its own builder:

Every draw call appends to that page's single content stream and returns $this, so calls can be chained:

Coordinates and units. Everything is in PDF points (1/72 inch), measured from the page's bottom-left corner, X increasing right and Y increasing up — standard PDF convention, not screen/CSS convention. Colors are RGB with each channel in the 0.0–1.0 range; Color converts from hex and 0–255.

If you would rather work in millimetres from the top-left, with a cursor, cells and automatic page breaks, see the layout layer — it is built on everything below and replaces none of it.

Documentation

The reference used to live in this file. It outgrew it, so it is now next door in docs/ — one page per thing you might be trying to do.

Putting marks on a page

Laying a document out

Producing and reworking files

Before you file a bug

Development

Tests live in tests/, mirroring the src/ structure.


All versions of mightypdf with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-dom Version *
ext-iconv Version *
ext-libxml Version *
ext-openssl Version *
ext-simplexml 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 jamesthomsen/mightypdf contains the following files

Loading the files please wait ...