Skip to content

feat(pdf): add license-safe source-edit fixture corpus (#32) - #59

Merged
McanKul merged 2 commits into
McanKul:developmentfrom
nonamexishere:feat/32-source-editing-fixture-corpus
Aug 26, 2026
Merged

feat(pdf): add license-safe source-edit fixture corpus (#32)#59
McanKul merged 2 commits into
McanKul:developmentfrom
nonamexishere:feat/32-source-editing-fixture-corpus

Conversation

@nonamexishere

Copy link
Copy Markdown
Contributor

Summary

Adds a small, license-safe source-editing fixture corpus for #32 (foundation for #11 / #33).

  • Generator: write_corpus_fixture in src-tauri/src/pdf_engine/source_edit_fixtures.rs (lopdf, then qpdf normalize)
  • Committed set: fixtures/source-edit/ (not bundled in src-tauri/resources/)
  • manifest.json: structure list, intent only try-edit | unsupported-stand-in, never editable
  • Covers Tj / kerned TJ, CID ± ToUnicode, Type 3, nested Form, rotated/skewed Tm, unique/reused/form/inline/mask images, Crop offset, UserUnit, Rotate 90/180/270
  • Total committed PDFs ~14 KiB (cap 2 MiB)

This does not implement existing-text editing, #33, or change Edit PDF Save. Independent of #54 / #55.

Fixes #32.

Validation

  • cargo test --manifest-path src-tauri/Cargo.toml --lib (includes 10 source_edit tests)
  • npm test
  • npm run typecheck
  • Manual: each fixture opens in the existing pdf.js preview

Privacy Checklist

  • This keeps OffPDF usable offline.
  • This does not upload, log, or transmit user files.
  • New dependencies or bundled binaries have compatible licenses.

nonamexishere and others added 2 commits August 26, 2026 17:55
Synthetic PDFs plus a lopdf writer and manifest for McanKul#11/McanKul#32. Intent is
only try-edit or unsupported-stand-in; nothing claims a fixture is
editable. Fixes McanKul#32.

@McanKul McanKul left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks — the corpus is synthetic, compact, clearly scoped, and does not make unsupported editability claims. I independently verified all 18 fixtures with qpdf and ran the 10 corpus tests locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants