Skip to content

research(editor): add a representative source-editing fixture corpus #32

Description

@McanKul

Goal

Build a small, license-safe fixture corpus for deciding which existing PDF text and image structures OffPDF can edit without corrupting the document.

This is a foundation for #11 and #12. It does not implement production editing.

Scope

  • Add deterministic synthetic fixtures for common text structures:
    • Tj and kerned TJ arrays
    • subset CID fonts with and without usable ToUnicode maps
    • rotated or skewed text
    • Type 3 fonts
    • text inside nested Form XObjects
  • Add deterministic synthetic fixtures for image structures:
    • a unique top-level Image XObject
    • an Image XObject reused on multiple pages
    • an image inside a Form XObject
    • an inline image
    • an image with a mask or soft mask
  • Include CropBox/MediaBox offsets, /UserUnit, and 0/90/180/270 degree rotations.
  • Document how every fixture was generated and what capability or failure mode it represents.
  • Prefer generation scripts over committing large binary files.

Acceptance criteria

  • Every normal fixture passes qpdf --check; intentionally malformed fixtures are clearly named and documented.
  • Fixtures are synthetic, contain no sensitive or proprietary source documents, and have clear license provenance.
  • The corpus opens in the existing pdf.js preview and backend test harness.
  • A machine-readable manifest records the expected text/image structure and whether it is intended to be editable or unsupported.
  • Tests verify fixture generation is deterministic and enforce a bounded total fixture size.
  • Spike: evaluate safe editing of existing PDF text and images #11 can use the corpus to publish a compatibility matrix and implementation recommendation.

Out of scope

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: editorPDF editor and document interaction workhelp wantedExtra attention is neededpriority: mediumMedium-priority roadmap workspikeTime-boxed technical investigationtestsTest coverage and test infrastructure

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions