Releases: dragonofmercy/php-pdf
Releases · dragonofmercy/php-pdf
v1.11.0
Added
- Open, read, import, and edit encrypted PDFs (RC4 40/128-bit, AES-128, AES-256) across
PdfReader,Document::importPdf(), andPdfEditor. Pass the password, or omit it for permissions-only files; edits keep the source's encryption. PdfEditor::flattenFields()- freeze filled AcroForm fields into static page content (all fields or a named subset; signature and button fields are kept). Works on encrypted PDFs.- Filling or flattening fields that use a font embedded in the document (simple Type1 / TrueType or composite Type0) now generates the correct appearance instead of failing.
PdfEditor::deletePages()andreorderPages()(1-based) - delete and reorder pages of an existing PDF. Deleting a page automatically cleans up the bookmarks, named destinations, and internal links that pointed to it. Works on encrypted PDFs.
v1.10.0
Added
- PDF/A-1 conformance (ISO 19005-1, PDF 1.4-based), levels 1b and 1a via
enablePdfA(PdfALevel::A1B)/A1A. Emits a%PDF-1.4header and forbids transparency entirely - an alpha PNG, an SVG with opacity below 1.0, or an SVG mask/filter is rejected with a clear error. veraPDF-validated. - PDF/A-4 conformance (ISO 19005-4, PDF 2.0-based) via
enablePdfA(PdfALevel::A4), plus theA4Fflavour for embedded files (e.g. Factur-X / ZUGFeRD). Emits a%PDF-2.0header, identifies viapdfaid:rev, and omits the deprecated/Infodictionary. veraPDF-validated.
With PDF/A-1, the library now supports the full PDF/A family - parts 1, 2, 3, and 4 are all veraPDF-conformant.
v1.9.0
Added
- 13 new standard page formats on
PageFormat, usable anywhere a format is accepted (e.g.addPage(PageFormat::A2)):- ISO A series:
A0,A1,A2,A7 - ISO B series:
B4,B5 - ISO C envelopes:
C4,C5,C6,DL - North American:
TABLOID(Ledger, 11x17 in),EXECUTIVE,HALF_LETTER
- ISO A series:
v1.8.0
Added
- Read existing PDFs -
PdfReaderparses any non-encrypted PDF (classic xref tables and cross-reference streams, object streams, the standard stream filters), with lazy object resolution and page-tree access. - Template import -
Document::importPdf()/importPdfBytes()plusPage::template()draw any page of an existing PDF as an opaque background or stamp (letterheads, overlays, watermarking); works with encryption, tagging, and signatures. - Modify existing PDFs -
PdfEditor::open()/PdfEditor::fromBytes()write changes as an appended incremental revision that leaves the original bytes (and any signatures) intact: refresh metadata and append new pages with the full page API, on both classic xref and cross-reference-stream sources. - Fill AcroForm fields - inspect a form with
formFields()/field(), then fill text, checkbox, radio, combobox, and listbox fields withsetField(); each filled field receives a generated/APappearance stream. - Sign existing PDFs -
PdfEditor::open()->sign()with full parity toDocument:sign(),addSignature(),addDocumentTimestamp(), andenableLtv(), RFC 3161 timestamps, the PAdES profiles (B-B / B-T / B-LT / B-LTA), and LTV/DSS, each a stacked incremental revision covering all prior edits. Reuses an empty signature field by name or creates one - invisible by default, or visible with a Helvetica caption viaSignatureAppearance.
v1.7.0
Added
- Right-to-left text (Hebrew) - Unicode bidirectional algorithm reordering on cells and tables, with
setBaseDirection(), a per-cell()direction:argument,Cell::direction(), and theDirectionenum. RTL right-aligns by default; byte-identical output when no RTL text is present. - Arabic shaping - contextual presentation forms (isolated/initial/medial/final) and mandatory lam-alef ligatures on cells and tables, in pure PHP (requires a font whose cmap carries the Arabic presentation forms).
- RTL Markdown - bidi reordering and Arabic shaping in
Page::markdown()andcell(markdown: true), with right-aligned RTL blocks and mirrored list markers / blockquote bars. - Inter-document TTF parse cache - parsed custom fonts are memoized in-process and shared across every
Document; transparent and byte-identical, withParsedTtfCache::clear()to reset it in long-running workers.
v1.6.0
Added
- Tagged PDF -
Document::enableTagging()accumulates a logical structure tree and emits/StructTreeRoot,/MarkInfo, the ParentTree and per-page/StructParents. Opt-in; byte-identical output when off. - PDF/UA-1 conformance -
Document::enablePdfUA()produces output that validatesisCompliantunder the veraPDF PDF/UA-1 profile: artifacts, figure alternate text, header-cell/Scope,DisplayDocTitle, an XMPpdfuaidpacket, and a fail-fast conformance guard. - Tagged hyperlinks - text links (
cell(link:, linkAlt:)), Markdown inline links, and image links (image(link:, linkAlt:)and Markdown[](url)) are tagged as<Link>structure elements wrapping their content, with/OBJR,/StructParentand/Contents. Markdown block images now carry/Alt. - PDF/A level A -
enablePdfA(PdfALevel::A2A)andA3Aemit PDF/A-2a / PDF/A-3a (Unicode requirements plus a tagged structure tree). Combining withenablePdfUA()yields a single file that is both PDF/A-2a and PDF/UA-1. This completes PDF/A level support (B, U, A across parts 2 and 3).
v1.5.0
Added
- Table cell spanning: data cells span columns with
Cell::colSpan(), plus grouped headers viaTableStyle::withColumnGroups()andColumnGroup(rowspan not yet supported). - Multi-column text flow:
Page::columns()flowscell()andmarkdown()across equal-width columns, filling each column before the next and continuing onto new pages. - Text justification:
TextAlign::JUSTIFYfills each wrapped line to the cell width for bothPage::cell()andPage::table()columns.
v1.4.2
v1.4.1
v1.4.0
Added
Page::image()now accepts aNextPosition $lnparameter, so images advance the page cursor after drawing likecell()andbarcode()(RIGHT / NEWLINE / BELOW / NONE). The default RIGHT preserves the previous behaviour.