Skip to content

Epic: Offline visual PDF editing #12

Description

@McanKul

Outcome

Deliver a trustworthy offline PDF editing roadmap without implying that every PDF can be edited like a Word document.

Proposed delivery order

Product boundary

The initial Edit PDF experience adds content through overlays and standard annotations while preserving the original page content. Replacing existing text/images is not promised until #11 demonstrates a safe, clearly bounded subset.

Shared definition of done

  • Fully local/offline processing; no new telemetry or network calls.
  • Original input is never overwritten.
  • Correct coordinates for CropBox/MediaBox and all page rotations.
  • Explicit handling of encrypted, malformed and very large PDFs.
  • Output validation with qpdf check plus interoperability fixtures.
  • Accessible keyboard path for editor controls.
  • Contributor documentation and automated tests accompany each shipped capability.

Architecture direction

  • React/pdf.js: rendering, selection and interaction.
  • A typed page-space edit model: UI/backend boundary.
  • Rust/lopdf: PDF object and content construction where appropriate.
  • qpdf: assembly, normalization, validation and optional annotation flattening.
  • Bounded decoding and file-size guards for untrusted documents.

Research notes

  • qpdf handles structural operations and annotation flattening, but its form appearance generation is limited.
  • lopdf exposes content streams and annotations, but loading/manipulating arbitrary PDFs needs explicit memory and decompression limits.
  • Existing-text editing is complicated by subset fonts, glyph mappings and nested content streams; it remains a spike rather than an MVP promise.

v0.4 direct editing foundations

Existing text/image replacement remains gated by #11. Follow-up production issues should cover only the supported subsets demonstrated by the spike; unsupported PDFs must fail explicitly rather than silently falling back to an overlay.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: editorPDF editor and document interaction workenhancementNew feature or requestpriority: highHigh-priority roadmap work

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions