Commit Graph
862 Commits
Author SHA1 Message Date
bflatastic 6b6531ff03 Merge remote-tracking branch 'origin/main' into tmpup
# Conflicts:
#	crates/engine/src/tests.rs
2026-11-09 10:31:59 +07:00
bflatastic 6bfc0af05d Merge remote-tracking branch 'origin/main' into tmpup 2026-11-09 10:12:20 +07:00
bflatastic 75a370c202 Merge remote-tracking branch 'origin/main' into tmpup 2026-11-09 10:12:17 +07:00
BFlat d8c2b9ffe8 Revert "fix(ui): show creation and modification dates in Document Properties (#5534) (#5536)" (#6671) 2026-11-09 11:09:22 +08:00
bflatastic 08c0a59212 Merge main into merge/redact-forms-misc
# Conflicts:
#	ROADMAP.md
#	crates/render/src/text/tests.rs
2026-11-09 09:56:59 +07:00
bflatastic 8ed1e1e155 Merge origin/main into merge/preflight-pdfa-checks 2026-11-09 09:55:52 +07:00
Nate Glasby b02765b6a1 fix(ui): show creation and modification dates in Document Properties (#5534) (#5536) 2026-11-09 10:06:03 +08:00
Ethunxxx fdffff7b85 M7: links that go to a page open at a chosen zoom (edit.action-goto) (#5277) 2026-11-09 10:04:00 +08:00
bflatastic fbff06bd83 Merge main into merge/redact-forms-misc
# Conflicts:
#	crates/engine/src/tests.rs
#	crates/render/src/inspect/tests.rs
#	crates/render/src/text/tests.rs
2026-11-09 09:03:20 +07:00
bflatastic 8dfb3bdc5b Merge origin/main into merge/preflight-pdfa-checks
# Conflicts:
#	crates/engine/src/tests.rs
2026-11-09 09:01:00 +07:00
bflatastic 0de09d6ee7 Merge remote-tracking branch 'origin/main' into tmp-53380 2026-11-09 08:43:28 +07:00
BFlat bfed7bbabe Fix main's build after the latest merges (#6660) 2026-11-09 09:43:17 +08:00
bflatastic cf10038885 Merge #6650: fix(edit): editing an OCR phrase redraws only the words it changes (refs #3313)
# Conflicts:
#	crates/edit/src/text.rs
#	crates/edit/src/text_regions.rs
2026-11-09 08:21:42 +07:00
bflatastic a7bc9c5301 Merge #6620: M5: comments keep their formatting and appearance through XFDF and FDF (comment.import-fdf-xfdf, comment.export-fdf-xfdf)
# Conflicts:
#	crates/xfdf/src/xfdf.rs
2026-11-09 08:21:11 +07:00
bflatastic 2992146abb Merge #6312: M1: a document that encrypts only its embedded files opens without a password (core.attachment-only-encryption)
# Conflicts:
#	crates/render/src/inspect/tests.rs
#	vendor/README.md
2026-11-09 08:12:28 +07:00
bflatastic 870d56a77d Merge #6231: fix(measure): snap on heavy sheets, off the window thread
# Conflicts:
#	crates/measure/src/snap.rs
2026-11-09 08:10:45 +07:00
bflatastic e2417e1561 Merge #6206: M11: PDF/A verify checks the file header and Save as PDF/A rewrites it (optimize.pdfa-validate)
# Conflicts:
#	crates/preflight/src/tests.rs
#	parity/acrobat-features.toml
2026-11-09 08:07:05 +07:00
bflatastic 56f1f3689e Merge #6463: Combine and Insert bring only the bookmarks and attachments of the pages chosen
# Conflicts:
#	crates/organize/src/tests.rs
2026-11-09 08:04:31 +07:00
mtlcl410 d65ae4268e M6: a calculate script that sets its own field through the field object keeps that value (form.custom-scripts) (#6616) 2026-11-09 08:59:19 +08:00
eliets2 a2f155e4df Deduplicate pages in ocr_job and use a set for page lookup (#6586) 2026-11-09 08:58:19 +08:00
mtlcl410 3e437b7bd4 M10: comments and fields without an appearance print as the page shows them (#6367) 2026-11-09 08:56:16 +08:00
mtlcl410 c67c44bf21 M10: applying recognized words refreshes only the page content they add (#6310) (#6316) 2026-11-09 08:55:14 +08:00
quincy-jc d0b2a32744 perf(optimize): work out pictures on threads and skip needless page reads (#6230) 2026-11-09 08:53:27 +08:00
oracola91 3c26e2e3eb Apply Redactions replaces the recovery snapshot at once (#6454) 2026-11-09 08:50:55 +08:00
mtlcl410 1a28606c64 M10: a layer the document marks screen-only stays off the printed sheet (print.print-ready-pdf) (#6387) 2026-11-09 08:48:28 +08:00
quincy-jc 0b9c7fb821 fix(canvas): find a page's pictures off the window thread (#6228) 2026-11-09 08:47:47 +08:00
mtlcl410 0a029f0aad M12: floating fields show the values scripts give them, and the sheet number and count (#6160) (#6166) 2026-11-09 08:45:03 +08:00
Harrison Booth 3b731f9458 Expose widget rectangles to field scripts (#6093) 2026-11-09 08:42:39 +08:00
Dylan M. Taylor ee6ae8eac4 fix(engine): coalesce script resetForm requests and bound console output per edit (#5975) 2026-11-09 08:41:24 +08:00
mtlcl410 6062cd6a44 M5: Replace Text keeps its replacement on the group's primary, the caret (comment.replace-text) (#5689) 2026-11-09 08:38:25 +08:00
jonathanwxh-cell 1f48670fce refactor(cos): consolidate duplicate civil_from_days onto pdfcraft_cos::civil_from_days (#6540)
Fixes #6466
2026-11-09 08:32:08 +08:00
jonathanwxh-cell 90def111c9 fix(engine): map URL text line rects with view_rect_to_user and filter non-finite coordinates (#6536)
* fix(engine): map URL text line rects with view_rect_to_user and filter non-finite coordinates

* test(engine): assert concrete rotated user rects and overflow guards (#6469)
2026-11-09 08:31:41 +08:00
3ae9093d61 M2: info lists the repairs made while opening, as Document Properties does (misc.cli-inspect) (#6518)
* M2: `info` lists the repairs made while opening, as Document Properties does (misc.cli-inspect)

`pdfcraft-cli info` now prints a `repairs` array: the notes about damage
repaired while opening that the app shows in Document Properties and
doc_info reports. It opens the document as the app does, once (the session
the dynamic XFA summary already used), so notes the app adds after reading
the objects, such as a page tree rebuilt from the pages found by scanning,
are listed too. A file the app cannot open for editing falls back to what
reading its objects repaired; a sound file prints an empty array.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyDBXygTf7jcqdsjcfn

* M2: `info` runs none of the document's scripts while inspecting it (misc.cli-inspect)

The session `info` opens to read the app's repair notes and the dynamic XFA
layout now has JavaScript turned off, so an XFA form's initialize and
calculate scripts, which the app runs on opening, do not run during
inspection of an untrusted file. Before this branch the session was opened
for dynamic XFA forms only, and their scripts ran there too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyDBXygTf7jcqdsjcfn

* M2: `info` reads the standards and repairs from the session it opens, and a laid-out form keeps its repair notes (misc.cli-inspect)

`info` now takes the declared standards (`Document::standards`, as the
Standards panel reads them) and the repair notes from the session it
opened, and reads the file once more only when the app cannot open it.
When opening lays out a dynamic XFA form, or writes any other revision,
the notes about damage repaired while reading the file now stay with the
re-read document, so Document Properties and `info` both list them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCHD1R3rywQBPCHXZA

---------

Co-authored-by: mtlcl410 <chuanlin@niar.org.tw>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 08:30:37 +08:00
Tiago KielandClaude Opus 5.5 a6229de16d fix(edit): review follow-ups to keeping OCR words (refs #3313)
- A draft with the same words (a space typed after the last) changes
  nothing and is no undo step. It used to redraw the whole phrase.
- Rewriting words alone is refused when it would move any other text on
  the page, visible text too, not only other OCR words.
- A cover stops at the words either side that stay: the padding of a
  large word could reach over the ink of a small one beside it.
- Spacing other than one space between words goes to the whole-phrase
  rewrite, which keeps it, instead of being dropped.
- A squeeze is relative to the scale the words already have.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 15:43:19 -05:00
Tiago KielandClaude Opus 5.5 4731036cdb fix(edit): editing an OCR phrase redraws only the words it changes (refs #3313)
Deleting one word from a recognised line covered the whole line and
redrew it in Helvetica, though nothing but that word had changed.

A text edit of an OCR phrase now covers and redraws only the words it
changes; the rest stay as the scan shows them, still invisible text. Each
changed stretch is rewritten as a phrase of its own, on a copy of the
document, and the edit falls back to the whole-phrase rewrite when words
can't be told apart or a kept word would move. A deleted word leaves its
gap. A replacement a little too wide is squeezed across to fit, by up to
a quarter; wider than that it takes over the next word. A change of
formatting, or a typed line break, still redraws the whole phrase.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 14:51:11 -05:00
mtlcl410andClaude Opus 5.5 79b7a79d97 M5: comment imports leave field values alone and paste keeps the appearance budget for what import reads (comment.import-fdf-xfdf, comment.export-fdf-xfdf)
- Appearance export checks a stream's size in the encoding it is written in
  (printable data as text, not as hexadecimal).
- Copy no longer writes a redaction mark's appearance, which import never
  reads, so it does not use up the budget the other comments share.
- Rich text: a namespace declaration inside another attribute's value is not
  a declaration, a '>' in a value does not end the start tag, and a prefixed
  root keeps the default namespace its unprefixed descendants inherit.
- import_comments never applies the file's field values, whatever the
  placement arguments (a non-finite offset used to fall through to them).
- The repair-log line for skipped appearances escapes control characters and
  cuts each description to 200 characters.
- Tests for the shared budget through the export loop, a near-limit appearance
  that round-trips, and the six-comment summary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCHD1R3rywQBPCHXZA
2026-11-09 02:59:47 +08:00
BFlat e0f90d5f2d Edit a PDF: select all, copy, cut and paste page objects within and between documents (#6639)
Refs #5989. Ctrl/Cmd+A selects every object on the page; copied objects paste as page content that draws the same, within a document or into another, with organize's bounded deep copy across documents. Headless: object_copy, object_paste, object_move all.
2026-11-09 02:32:50 +08:00
mtlcl410andClaude Opus 5.5 b4efe3f78c Merge upstream/main into feat/xfdf-comment-formatting-appearance
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCHD1R3rywQBPCHXZA
2026-11-09 02:23:40 +08:00
mtlcl410andClaude Opus 5.5 9bd278a9b3 M5: comment imports are all or nothing and appearance export stops where import does (comment.import-fdf-xfdf, comment.export-fdf-xfdf)
- import and import_comments work on a copy, kept only on success.
- XFDF export shares the 64 MiB appearance budget import reads over all
  comments; import refuses a normal appearance of several states (XFDF has
  no /AS to select one, ISO 32000-2 §12.5.5).
- FDF import nulls a page or page tree an appearance reaches (/Type resolved).
- Rich text: an inherited default namespace other than XFDF's is declared,
  and a namespace declaration with spaces around `=` is recognised.
- A redaction mark's /Rect grows to hold its quads, so the outline shows.
- The repair log gets one line per import (first five, then a count), and
  no longer claims the comment is drawn.
- Tests: the sixty-form chain, and the redaction outline is stroked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCHD1R3rywQBPCHXZA
2026-11-09 02:12:23 +08:00
mtlcl410andClaude Opus 5.5 97373fba4e M5: imported appearances arrive whole or are said, and redaction marks are always drawn (comment.import-fdf-xfdf, comment.export-fdf-xfdf)
- XFDF export: the finished appearance XML is checked against the import limit;
  a page whose /Type is a reference stays out; stream data with a carriage
  return goes out as hex (XML 1.0 §2.11 end-of-line handling); where /AS selects
  one of several states, the selected stream is written.
- XFDF import: dash arrays of any length come back; consecutive <br/> keep the
  blank line in /Contents; rich text written as text on a comment with no
  /Contents comes back as /RC; namespace prefixes rich text inherits are declared
  on it; appearances share one budget over the import (now tested through it).
- Redaction marks: the file's /AP and a /BE (none in ISO 32000-2 Table 195) are
  dropped and the mark is drawn by PdfCraft; one with an area it cannot draw is
  refused rather than placed invisible.
- FDF import: /P is not copied (the page is /Page, §12.7.8.3.4 Table 254); a
  comment nested past 256 levels refuses the file instead of nulling part of its
  appearance (a chain of 60 forms comes back whole).
- Engine: appearances an import left out go to the repair log for Import and
  Paste comments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCHD1R3rywQBPCHXZA
2026-11-09 01:22:12 +08:00
bflatastic 8f5a5aeb89 Merge remote-tracking branch 'origin/main' into fix/thai-grouped-text-v2
# Conflicts:
#	docs/roadmap.md
2026-11-09 00:13:03 +07:00
BFlat da6ee1e62a Merge pull request #6634 from storytold/merge/1641-web-ocr
OCR in the web build (#1641, merged with main, two fixes)
2026-11-09 01:10:19 +08:00
bflatastic 8ea3c638d2 OCR file-job test compares what was read, not the save's timestamp
a_file_job_reads_in_two_halves compared the two saves' bytes, which carry the
modification time, so it failed when the saves landed a second apart.
2026-11-08 23:38:58 +07:00
bflatastic 6bc6d80279 Merge remote-tracking branch 'origin/main' into merge/1641-web-ocr 2026-11-08 23:38:03 +07:00
bflatastic 1ea1c63f3d Merge remote-tracking branch 'origin/main' into merge-5498
# Conflicts:
#	parity/acrobat-features.toml
2026-11-08 23:33:35 +07:00
bflatastic ae7a21d2b0 Edit grouped text with one click instead of preparing pages on sight
Edit text queued Prepare grouped text for every page that came into view, after a full
preparation on a copy of the document on the UI thread to see whether it could. Scrolling cost
that work per page, marked the document changed, added undo steps and inlined shared forms
although nothing was edited.

Now nothing happens while pages are shown. A click (press and release, no drag) on grouped
artwork, routed to the picture by the page router as before, asks once whether that artwork
shows text preparation would open (text::forms::grouped_text_at, which reads the page without
copying or changing it). If it does, the page is prepared as one undoable step and the
paragraph at the point clicked opens for typing. A logo or a group preparation would refuse is
selected as before, with no message and no change. A drag still moves the selected group, and
while a paragraph is open or an edit is waiting the click selects as before. text_prepare is
unchanged.

The docs and the parity entry no longer say text is prepared on entering Edit text.
2026-11-08 22:31:14 +07:00
bflatastic cc9f7977bf Repair a page's damaged THSarabunPSK map without grouped text
The repair reads the page's own fonts. It ran only after a group was expanded, so the same
damaged map on text that was never grouped kept reading wrong. Preparation now repairs it
whenever it finds it, recorded in the repair log as before, and PrepareText (text_prepare)
succeeds when it repaired a map even with nothing to expand. A repaired map no longer matches
the damage's fingerprint, so preparing again changes nothing.
2026-11-08 22:31:14 +07:00
bflatastic 4444355446 Merge grouped Thai text editing (#6249)
# Conflicts:
#	parity/acrobat-features.toml
2026-11-08 22:31:13 +07:00
mtlcl410 7d1dea0517 M7: Ungroup draws Form artwork in place, so its text can be edited (#3067)
Refs #2964, #3005
2026-11-08 22:14:30 +08:00
FredApps 82c2009d09 Merge pull request #6208 from vangel76/fix/5939-sign-need-appearances
Signing a form that sets NeedAppearances no longer makes Acrobat ignore the signature
2026-11-08 13:31:20 +01:00