Skip to content

[Prepress] Add PDF/X and PDF/A conversion, not only validation #167

Description

@mberrys

Part of #155.

Problem

Loupe has no path to produce a standards-conformant PDF. #21 covers PDF/X policy validation and normalized conformance findings — reporting whether a file conforms. Nothing converts a file to conformance, and PDF/A is not addressed at all.

Verified: no PDF/X or PDF/A conversion path in the engine or PdfTool; no output-intent authoring; no /GTS_PDFXVersion writing; no PDF/A identification metadata.

For the target user this is a routine daily requirement, not an advanced feature:

  • Trade printers, brand owners, and ad-delivery specs demand PDF/X-1a, X-3, or X-4 as the exchange format. A shop that receives a non-conformant file and needs to deliver a conformant one currently has to leave Loupe.
  • The wedge ends at "verified press-ready output". For a large share of real jobs, "press-ready" is a PDF/X conformance claim. Validating and reporting non-conformance without a remedy stops one step short of the product's own stated outcome.
  • PDF/A matters for the archival copy of a job — a real requirement for regulated and government print work, and a natural fit for a product that already keeps an operation ledger.

Scope

  1. Conversion to PDF/X, targeting the parts that matter commercially: X-1a (requires flattening — see the transparency-flattening issue in this epic), X-3, and X-4. Cover output-intent embedding, colour-space normalization, font embedding, transparency policy, and the metadata/identification the standard requires.
  2. Conversion to PDF/A, at the level actually needed for archival deliverables, with the conformance level explicitly chosen and recorded rather than implied.
  3. A pre-conversion report: what will change, what cannot be made conformant automatically, and what requires an operator decision. Conversion that silently alters colour or substitutes a font is exactly the opaque behaviour the product boundary rules out ("not an opaque generative editing system for production PDFs").
  4. Post-conversion validation using an independent validator, not the engine that performed the conversion. Self-validation of a conversion is not evidence. docs/PACKAGING_LICENSING.md already contemplates optional veraPDF — settle that dependency here, including its licensing consequences.
  5. Registration as a semantic operation under the shared contract, available identically from Editor, PdfTool, and PageMaster.
  6. Record the claim boundary: which standards and levels Loupe asserts it can produce, and which it can only validate. An overstated conformance claim is a commercial liability.

Acceptance criteria

  • Conversion to each supported target produces output that an independent validator accepts.
  • Conversion that cannot reach conformance fails with a report naming each blocking condition, and never emits a file claiming conformance it does not have. A wrongly-claimed /GTS_PDFXVersion is worse than no conversion.
  • The pre-conversion report enumerates colour, font, and transparency changes before execution.
  • Revalidation runs automatically after conversion ([0.3.0-C] Automatically re-preflight after every fix #129), and the resulting preflight verdict reflects the converted file.
  • Identical semantics across Editor, PdfTool, and PageMaster.
  • The supported-standards claim is documented and matches what the tests cover.

Test strategy

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions