Skip to content

v1.3.0: Fill, Edit & Sign - #107

Open
sparshsam wants to merge 4 commits into
mainfrom
feat/v1.3.0-fill-edit-sign
Open

sparshsam wants to merge 4 commits into
mainfrom
feat/v1.3.0-fill-edit-sign

Conversation

@sparshsam

Copy link
Copy Markdown
Owner

Summary

OpenReader v1.3.0 — Fill, Edit & Sign turns the reader into a practical local PDF completion tool:

Open a PDF → Fill its fields → Add text or images → Sign → Save or export.

Everything runs locally. No accounts, subscriptions, cloud processing, or uploads.

What's included

Fill — interactive and non-interactive forms

  • Native AcroForm fields rendered as editable Qt overlays: single/multiline text, checkbox, radio groups, combo, listbox.
  • Existing values preserved; read-only/max-length/required/password/comb rules respected; field highlights.
  • Tab/Shift+Tab navigation and accessible names.
  • Field type intelligence (explicit vs. inferred) with advisory validation and a date picker.
  • Form Navigator with filled/empty/required/invalid status, next/previous field, clear field/form, completion review, autosave/recovery.
  • Non-interactive forms are completed with the Add Text tool (no automatic field recognition in this release).

Add Text — freeform editing

  • Click anywhere to add a multiline text object; inline editor; multiline boxes auto-grow.
  • Drag, resize, rotate in 90° steps, duplicate, copy/paste, delete.
  • Contextual formatting bar: Helvetica / Times New Roman / Courier New, size, color, bold, italic, underline, left/center/right alignment.
  • Stored as native PDF FreeText annotations with an OpenReaderData metadata key — saved files reopen with editable objects and the text remains selectable in other viewers.

Sign — visual electronic signatures

  • Draw (mouse/touch/pen/trackpad, smooth strokes, clear/retry), Type (local signature-style fonts, preview), Import (PNG/JPEG/BMP/WebP/GIF, transparency preserved), and Saved signatures.
  • Place anywhere, drag, resize proportionally, rotate, duplicate, remove, add to multiple pages.
  • Optional local signature library with per-entry delete and clear; nothing is uploaded.
  • Explicitly a visual electronic signature, not a certificate-based digital signature (out of scope).

Images

  • Insert common formats, position, proportional resize, rotate, duplicate, delete — reusing the signature placement infrastructure.

Persistence & safety

  • Atomic Save / Save As; Export Flattened PDF (Document.bake) on a copy, original untouched.
  • Dirty indicators in the tab and window title; Save / Discard / Cancel on close.
  • Undo/redo for editable objects; native widget undo for form fields.
  • Existing annotations, links, bookmarks and metadata preserved.
  • Digital-signature documents warn before editing/saving; encrypted documents and /Rotate pages are read-only for editing.

UI

  • Fill | Add Text | Sign | Image on the compact v1.2.8 toolbar.
  • Stable contextual formatting bar (no viewport jump when selecting an object) with a hint when nothing is selected.
  • Editing works directly in virtualized continuous scroll at any zoom; light/dark themes; accessible names/tooltips; Escape, Delete, Ctrl+Z/Y/C/V/S, Ctrl+Shift+S.

Architecture

Module Responsibility
pdfreader_lib/form_fields.py Qt-free AcroForm engine (shared with MCP)
pdfreader_lib/edit_objects.py Qt-free editable-object model, metadata, atomic save, flatten, signature detection, safety checks
pdfreader_lib/edit_gui.py Per-tab controller, page overlays, inline editor, signature dialog/canvas, undo/redo
pdfreader_lib/signature_store.py Local-only PNG signature library
main.py Toolbar/context bar, overlay attachment, save/dirty UI

Verification

  • 261 passed, 18 skipped (pre-existing skips) locally on Python 3.14 and in a Python 3.11 environment matching the CI Validate job.
  • New: 16 editable-model tests, 5 signature-store tests, 16 offscreen editing GUI tests, plus the ported form-engine/MCP suites.
  • Packaging tests 7/7; version alignment 1.3.0 / MSIX 1.3.0.0 / MCP 1.3.0; frozen identity unchanged; .pdf association intact.
  • Round-trip verified with PyMuPDF/MuPDF (save → reopen → re-edit text/images/signatures; flattened copy has no annotations/widgets while preserving text and images). No external PDF viewer is installed in the development environment; other-viewer validation is requested in manual QA.
  • Existing v1.2.8 reader, continuous scrolling, toolbar, search, annotations and multi-tab regressions remain green.

Known limitations (v1.3.0)

  • Text rotation is 90° increments only (FreeText /Rotate).
  • Text fonts are the Base-14 Helvetica / Times New Roman / Courier New families; typed signatures use installed local fonts.
  • Editing arbitrary pre-existing embedded PDF text is out of scope.
  • Certificate-based digital signing is out of scope; signatures are visual.
  • Encrypted PDFs and rotated pages are read-only for editing (PyMuPDF 1.28 decryption quirk handled conservatively).
  • Images/signatures are raster image content; text remains native and selectable.

Out of scope for this PR

No merge, tag, GitHub release, or Microsoft Store submission. The v1.3.0 form backup branch wip/v1.3.0-form-intelligence is unchanged.

🤖 Generated with Claude Code

sparshsam and others added 3 commits November 8, 2026 19:20
Integrate the preserved form work from wip/v1.3.0-form-intelligence onto
the released v1.2.8 architecture, leaving the backup branch untouched:

- pure AcroForm engine (pdfreader_lib/form_fields.py): normalized fields,
  type detection, advisory validation, local form-state store
- native Qt overlays for text, multiline, checkbox, radio, combo and
  listbox fields, with Tab navigation and accessible names
- Form Navigator dock, completion workflow, autosave/recovery
- form save / Save As, dirty tracking, close prompts
- five MCP form tools mirrored in the standalone package (19 tools total)
- adapt form overlays and highlights to the virtualized continuous
  renderer: attach on page render, detach on pixmap release/teardown

All 224 tests pass (18 skipped).

Co-Authored-By: Claude Code <noreply@anthropic.com>
Complete the Fill, Edit & Sign release on top of the v1.2.8 reader.

Editing model (Qt-free, pdfreader_lib/edit_objects.py):
- text stored as native FreeText annotations carrying OpenReaderData
  metadata (re-editable after save/reopen, selectable in other viewers)
- signatures/images stored as page-content image XObjects with the same
  metadata, unique per placement
- atomic save, Save As, flattened export via Document.bake on a copy,
  signature detection, encrypted/read-only and rotated-page safety

Editing UI (pdfreader_lib/edit_gui.py):
- per-tab EditController with overlays on the persistent continuous
  page labels, so editing works without leaving continuous scrolling
- inline multiline text editor, contextual formatting bar (font, size,
  color, bold/italic/underline, alignment, 90-degree rotation), drag,
  resize, duplicate, copy/paste, delete and snapshot undo/redo
- signature dialog with draw, type (local fonts) and import methods
- local-only signature library (pdfreader_lib/signature_store.py)

Window integration:
- Fill | Add Text | Sign | Image toolbar actions, stable contextual bar
  with a selection hint, dirty tab/window indicators and close prompts
- editing survives zoom, scrolling, window resize and tab switches;
  clear error handling for closed documents and read-only files

Tests: 16 model, 5 signature-store and 16 offscreen editing GUI tests
(inline Ctrl+Enter commit, formatting, images/signatures, undo/redo,
Save As, flatten, coordinate mapping, continuous mode, rotated pages,
themes). Full suite: 261 passed, 18 skipped.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Document the editing architecture, persistence rules, safety limits,
UI, limitations and test coverage. Align the MCP package metadata to
1.3.0.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Deploying reader with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1e31e62
Status: ✅  Deploy successful!
Preview URL: https://57468db7.reader-bsl.pages.dev
Branch Preview URL: https://feat-v1-3-0-fill-edit-sign.reader-bsl.pages.dev

View logs

Record the released v1.2.8 baseline, the implemented-but-unreleased
v1.3.0 Fill/Edit/Sign branch and PR #107 (implementation head 7106ae5),
test/CI status, backup branch 60038ca, known limitations, branching/CI/
versioning/release/Store workflows, and the isolated Windows runtime
testing task for the next session.

Documentation only: no application code, version, tag, release, branch
protection, or Store changes.

Co-Authored-By: Claude Code <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant