Skip to content

Releases: PDFToolkit/pdf-to-html

v0.3.1

Choose a tag to compare

@roukmoute roukmoute released this 15 Oct 08:07

Require pdf-reader 0.3.1 so native authenticated derivation uses its corrected metadata and embedded-file cipher selection.

  • Limit the implicit EncryptMetadata=false exemption to the document catalog's actual Metadata reference. Page and object metadata continue through their selected filter.
  • Resolve indirect embedded-file stream types and incorporate the reader's V4 key/default and standard crypt-filter name corrections.
  • Refresh stable dependencies to reader 0.3.1 and core 0.8.0 while retaining compatibility with core 0.7.1 and the immutable derivation model.
  • Update English and French installation, coverage and authentication documentation.

Requires PHP 8.3+. Password preparation, user/owner permission propagation and explicit rejection of unsupported source PDF MAC/public-key authentication remain unchanged. This package does not verify CMS trust.

Installation: composer require pdftoolkit/pdf-to-html:^0.3.1

Documentation: English · Français

The exact release commit passed all checks and independent oracles on PHP 8.3, 8.4 and 8.5: https://github.com/PDFToolkit/pdf-to-html/actions/runs/38703203459.

v0.3.0

Choose a tag to compare

@roukmoute roukmoute released this 15 Oct 07:18

Native password-authenticated tagged PDF derivation is now available through an explicitly injected pdf-reader 0.3 reader.

  • Preserve verified user and owner permissions in the immutable HTML source model; reject adapters that discard or elevate those permissions.
  • Decode supported LZW inline images into actual pixels, with independent pixel verification.
  • Keep password encoding and authentication capabilities explicit. Unsupported security handlers fail; this release does not claim CMS trust or PDF MAC verification.
  • Add English and French authentication documentation, real qpdf encrypted fixtures, and independent qpdf/pypdf/HTML5 validation.

Requires PHP 8.3+, pdf-reader ^0.3 and core ^0.7.1 or ^0.8. The exact release commit passed all checks and independent oracles on PHP 8.3, 8.4 and 8.5: https://github.com/PDFToolkit/pdf-to-html/actions/runs/38697197488.

Installation: composer require pdftoolkit/pdf-to-html:^0.3

Documentation: English · Français

0.2.1 — Preserve standalone Form rendering

Choose a tag to compare

@roukmoute roukmoute released this 14 Oct 23:17

Directly referenced Form XObjects now retain their exact clipping and transparency during isolated graphics export. Version 0.2.0 flattened a standalone Form into page instructions, which could paint outside a sheared /BBox and lose its /Group behavior. The exporter now retains the Form as a real XObject, including /BBox, /Group and optional-content membership.

The composed Form transformation is applied exactly once. Explicit viewports remain in default page coordinates and use the immutable PageTransform independently of the Form matrix, including page rotation and UserUnit. Native reading supplies the page context; manually constructed standalone Form models must provide it when requesting an explicit page-space viewport.

Validation: 432 tests / 5,904 assertions, PHPStan, formatting and Composer checks on PHP 8.3–8.5. Fourteen independent pypdf/Poppler context comparisons include standalone OBJR clipping, CMYK transparency, hidden optional content, transformed viewports and direct/indirect null UserUnit. Exact candidate CI: 522414cfe06cd071efce5843bdbdae59802a8388.

composer require "pdftoolkit/pdf-to-html:^0.2.1"

Changelog · Graphics guide · Clause ledger · Documentation

0.2.0 — Deriving HTML 1.2 object pipeline

Choose a tag to compare

@roukmoute roukmoute released this 14 Oct 22:54

This release completes the Deriving HTML from PDF 1.2 pipeline with explicit immutable source objects and processors scoped to one document. The retained reference is mapped to 69 clause decisions with linked implementation and test evidence.

  • Validate forward/inverse structure associations, binary identifiers, table header relations, namespaces and navigation actions. Resolve final destinations after HTML attribute overrides and associated alternatives.
  • Select ActualText and Alternative/Supplement replacements before interpreting discarded content, preserving original content when a policy blocks a replacement. Respect owner priority, list-label Placement and resolved MathML roles.
  • Complete simple-font Unicode fallback with pinned Adobe glyph data and interpret verified inline-image/CCITT boundaries with dimensional fallbacks.
  • Preserve complete graphic programs and export isolated selected figures with original resources, clipping, text advances, inherited fonts, page transparency and optional-content visibility. An explicit rasterizer object supplies image rendering; no engine is launched implicitly.
  • Implement targeted ResetForm defaults and supported HTML SubmitForm selections with separate opt-in policies. Keep PDF ECMAScript disabled independently, scope runtime events/values to the derived document and preserve final field bindings.
  • Put page-navigation IDs on actual content parents and retain form expansion/label identities. Require reader 0.2.3 and authenticate only its verified encryption signal.

New executable examples demonstrate figure export and safe field reset. English and French guides explain the model, policies, original reference, coverage, clause ledger, security and rendering integration.

Validation: 428 tests / 5,870 assertions, PHPStan, formatting and Composer checks; independent pypdf/HTML5 parsing, PNG/sample checks, libtiff fax payloads, Poppler pixel comparisons and Node form-runtime cases. Exact candidate CI on PHP 8.3–8.5: 6652b4b6dfee9dba689174e038f660e91858c573.

composer require "pdftoolkit/pdf-to-html:^0.2.0"

Rasterization, cryptographic authentication, additional codecs and receiving-viewer permissions are explicit integration responsibilities. Supported derivation rules do not mean every external PDF is accepted, complete Acrobat scripting emulation or automatic accessibility certification.

Changelog · Clause ledger · Original PDF · Documentation

0.1.2 — Correct normative derivation and clarify coverage

Choose a tag to compare

@roukmoute roukmoute released this 14 Oct 20:49

Correct normative derivation cases in the implementation of PDF Association Deriving HTML from PDF 1.2. Coverage remains partial and is now documented explicitly, including seven verified technical gaps.

  • Associate indirect and nested Form labels with their own widgets.
  • Apply ActualText replacements before decoding shared page content, while preserving page anchors and strict structural validation.
  • Keep widget-specific events separate from shared field validation and values. Immutable WidgetBinding objects connect runtime handlers to their actual HTML controls, including nested forms and renamed controls.
  • Preserve explicit HTML titles and HTML/CSS list-body display over structural defaults.
  • Link both READMEs directly to the unchanged reference PDF and distinguish missing mechanisms from deliberate security policies.

Validation: 224 tests / 753 assertions on PHP 8.3, 8.4 and 8.5; PHPStan and PSR-12; strict Composer/platform/audit checks; independent pypdf/HTML5 derivation and Node runtime checks. Exact-candidate CI: https://github.com/PDFToolkit/pdf-to-html/actions/runs/38635008088

0.1.1 — Complete PDF 2.0 demonstration metrics and appearance

Choose a tag to compare

@roukmoute roukmoute released this 14 Oct 18:54

Correct the independently generated PDF 2.0 demonstration fixture before its publication in the shared documentation.

  • Supply Helvetica's explicit character ranges, AFM widths and indirect font descriptor, including the glyph encoding used by the Unicode example.
  • Provide AcroForm default-appearance font resources and a normal widget appearance; position the demonstration text on distinct visible lines.
  • Strengthen the independent PDF oracle to detect missing font metrics and appearance resources before validating the derived HTML.
  • Update the reproducible fixture fingerprint and English/French coverage evidence.

The production PHP API and semantic HTML output are unchanged. The original PDF Association reference remains unchanged. PHP 8.3, 8.4 and 8.5 each pass 192 tests / 592 assertions; independent pypdf, HTML5, PDF2 font controls, qpdf and Poppler checks validate the corrected fixture.

Module documentation · Tutoriel français

0.1.0 — Tagged PDF to semantic HTML

Choose a tag to compare

@roukmoute roukmoute released this 14 Oct 18:42

First public release of pdftoolkit/pdf-to-html, an optional PHP 8.3+ package following PDF Association Deriving HTML from PDF 1.2.

Semantic derivation

  • Immutable source objects and document-scoped processing, with explicit reading, interpretation, derivation and output ownership.
  • Logical structure, transitive namespace-aware role maps, attributes/classes, text alternatives, lists, tables, figures, links, MathML and interactive/non-interactive forms.
  • Associated-file Alternative/Supplement processing, safe HTML/CSS/URL validation, cumulative budgets, assets and diagnostics.
  • Explicit opt-in document/field/page JavaScript bridge, plus renderer and authenticated-source integration ports.
  • Bounded tagged-PDF adapter using the published PDF reader; original 74-page reference preserved unchanged under resources/reference-documents/ and excluded from Composer archives.
  • English/French guides, coverage table and executable PDF-to-HTML example.

Validation

192 tests and 592 assertions pass on PHP 8.3, 8.4 and 8.5. PHPStan level 8, PSR-12, Composer validation/platform checks and dependency audit pass. Independent pypdf and HTML5 parsing validate the real fixture and derived output; Node verifies the opt-in runtime.

This release derives semantic HTML from usable tagged input. It does not promise arbitrary PDF conversion, exact page-layout reconstruction, complete Acrobat JavaScript emulation or accessibility certification. Unsupported input mechanisms are documented and produce diagnostics or exceptions; rendering and cryptographic authentication require explicit application integrations.

composer require "pdftoolkit/pdf-to-html:^0.1.0"

Documentation · French tutorial · Coverage