Commit Graph
4320 Commits
Author SHA1 Message Date
ogzhnklvz 13c86b40e8 i18n: Turkish section titles and in-sentence labels keep İ and ı (#3114)
Section titles are drawn upper case through to_uppercase(), and tool names
inside sentences lowercased through to_lowercase(). Rust's case mapping knows
no language, so in Turkish "Gelişmiş" became "GELIŞMIŞ" and "İmza" became
"i̇mza" (i plus a combining dot). Turkish maps i ↔ İ and ı ↔ I.

upper_label() translates and upper-cases a title with the Turkish rule when
the label has a Turkish row (an untranslated label is still English and keeps
the English rule); in_sentence() lowercases with it. Other languages are
unchanged. The test failed before the fix ("GELIŞMIŞ").
2026-10-18 03:12:05 -04:00
PerchenkoAnton f8d7eb1352 M3: prevent oversized page textures after replacement (#3149) (#3182) 2026-10-18 03:11:54 -04:00
mtlcl410andClaude Opus 5.5 fe3e07c244 fix(forms): an XFA form whose config forbids dynamic rendering is static (#3180)
An XFA form with no AcroForm fields was always classified as dynamic, so
opening it laid the template out into new pages and appended them as a
revision: the pages the user saw, and any later save, were PdfCraft's
layout rather than the file's own pages, with nothing saying so. Adobe
Designer writes <dynamicRender>forbidden</dynamicRender> in the config
packet of a static PDF form; such a form is now static and its pages are
kept. /NeedsRendering still makes a form dynamic, and with no word from
the config a form without fields stays dynamic as before.

The config packet is found in an /XFA array or a whole-XDP stream, read
with a 16 MiB decode cap, and scanned for the one element.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RUNQSPVXx3dDBabRZHAnjz
2026-10-18 15:07:38 +08:00
PerchAnton 66981f1e47 M7: normalize added-image rotations before addition 2026-10-18 09:38:29 +03:00
PerchAnton 095e1d36bd chore(pr-3042): integrate main d8b27058 2026-10-18 08:36:10 +03:00
PerchAnton b05d0cce4a chore(pr-3000): integrate main d8b27058 2026-10-18 08:33:10 +03:00
PerchAnton 1e498ec214 chore(pr-2648): integrate main d8b27058 2026-10-18 08:24:36 +03:00
PerchAnton 309834ffef chore(pr-2624): integrate main d8b27058 2026-10-18 08:20:38 +03:00
PerchAnton 226ed13c88 chore(pr-2619): integrate main d8b27058 2026-10-18 08:18:14 +03:00
PerchAnton 8e9292075b chore(pr-2615): integrate main d8b27058 2026-10-18 08:15:35 +03:00
jonathanwxh-cell 2e880a84ed M2: refresh CropBox text clipping after upstream cleanup 2026-10-18 12:22:26 +08:00
jonathanwxh-cell f0975318d1 Merge upstream main into footnote selection fix 2026-10-18 12:17:59 +08:00
alehel 6d671bd318 Merge remote-tracking branch 'origin/main' into fix/background-hidden-by-page-backdrop
# Conflicts:
#	ROADMAP.md
2026-10-18 06:13:18 +02:00
d8b2705825 Clear replacement text (#1350)
* M8: Clear marked-content replacement text

* M8: Move roadmap note

* M8: Keep inherited resource guard clean under Rust 1.96

---------

Co-authored-by: Codex <codex@openai.com>
Co-authored-by: skylar taylor-barrick <hi@skylar.cc>
2026-10-17 22:10:22 -06:00
skylar taylor-barrick d36a2ccbf7 Image Arrange: keep the image's clipping and position through later edits
- Remove Crop rebuilds the image's placement from its drawn CTM instead of
  pattern-matching cm ops. After an Arrange under a translated CTM it used to
  keep the absolute placement and draw the image displaced.
- Arrange refuses a move that would change which clips apply to the image
  (moving it past a top-level clip it isn't under, or out from under one
  without redrawing it), instead of silently cropping it.
- The exact-clip test now checks the moved copy carries its own clip and
  hit-tests both images.
- Cargo.lock: add pdfcraft-edit's pdfcraft-render dev-dependency, which the
  previous lockfile commit left out (CI failed --locked).
2026-10-17 22:04:17 -06:00
jonathanwxh-cell 0bdfdf87c1 M2: refresh CropBox text clipping against upstream main 2026-10-18 11:44:30 +08:00
skylar taylor-barrick 3f18a53d51 Wait for the text layer in text_selection_action_icons
The test dragged a selection after a fixed four frames, but the page's text
layer arrives from the render pool in the background; under load it was
sometimes not in yet, the drag selected nothing and the assertion failed
(3 of 20 runs of the editing binary locally). Wait until DocView reports
the page's text instead, via a new has_page_text accessor.
2026-10-17 21:32:40 -06:00
skylar taylor-barrick 6eaec60aba Keep main's Cargo.lock; add only pdfcraft-edit's new pdfcraft-render dev-dependency 2026-10-17 21:30:47 -06:00
jonathanwxh-cell 22064736cd M2: pin leading superscript line geometry regression (#2929) 2026-10-18 11:00:07 +08:00
Guillem Hermida 12fcc64115 Tests: make timing-dependent render and UI tests deterministic (#2812)
Seven tests failed at random on slow or busy machines, main included
(FreeBSD run 38834256439 at 5fdd820b). They now count the work or wait
for the state they check; no assertion is loosened and nothing retries.

- spot_colour_images_run_their_tint_transform_once_per_sample_value
  counts tint-transform runs (exactly 256, not one per pixel) through
  vendored hayro-interpret patch (34), color::tint_transform_runs, a
  thread-local counter, instead of a 10 s deadline.
- shadings_with_large_sampled_functions_paint_quickly: no counter tells
  the flat table from the hash map (both read every sample per build),
  so the build each paint does is timed against reading its samples on
  the same thread, fastest of 8 rounds each, and must stay under 10x
  (flat table 1.1x, hash map 109x), instead of a 10 s deadline.
- page_contents_and_nested_forms_share_one_budget: the budget is
  checked by its warnings; the deadline is only a hang guard, now 600 s.
- The pen-stroke tests hold finished renders back from the view
  (DocView::hold_rasters, for tests) while they look at the settling
  stroke, then wait by state for its raster.
- files_and_quit_from_the_operating_system waits for the tab before
  deleting the file the open worker reads.
- image_pixels_follow_the_frame_while_a_corner_is_dragged waits for the
  page raster on screen before each drag.

Product fix (#1858): a released drawing stayed painted only until any
raster of its page arrived. In full screen its edit is applied a frame
later, so a raster already under way could end the preview first. A
settling drawing is now marked committed when its AddAnnotation lands,
only rasters after that end its preview, and a failed edit drops it.
2026-10-17 20:53:39 -06:00
skylar taylor-barrick 4938bbf272 Merge storytold/pdfcraft main (picks up the zbus advisory ignores) 2026-10-17 20:44:19 -06:00
jonathanwxh-cell 958914e72b fix(edit): merge main into paragraph background repair 2026-10-18 10:41:08 +08:00
jonathanwxh-cell 6454dd2c24 Merge commit '645016addcfb9078c557f0189559ab47cdcee057' into repair/2960 2026-10-18 10:22:04 +08:00
Brandon ThomasandClaude Opus 5.5 645016addc Release 0.9.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v0.9.0
2026-10-17 21:43:00 -04:00
Osvaldo Duran MelendezandClaude Opus 5.5 156c69f5cf Merge upstream main 3f5a784c into pr/attachments
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 20:27:35 -04:00
jonathanwxh-cell d7b4d576a1 fix(render): emit clip-only text (7 Tr) to devices for text extraction (#3109) 2026-10-18 08:16:58 +08:00
alehel a21faed4e0 Merge remote-tracking branch 'origin/main' into fix/background-hidden-by-page-backdrop
# Conflicts:
#	crates/edit/src/lib.rs
2026-10-18 02:06:28 +02:00
skylar taylor-barrick 3f5a784c2c Merge pull request #3102 from skylartaylor/fix/content-boundaries-and-mark-isolation
Read stream-boundary comments as the renderer does, and isolate new marks from appended graphics state
2026-10-17 18:03:38 -06:00
sanches 5b61047e9d i18n: re-verify and update the translation-catalog SHA-256 entries after the merge 2026-10-18 02:44:38 +03:00
mtlcl410andClaude Opus 5.5 b15fe91627 test: the image-drag pixel test waits for the page raster
image_pixels_follow_the_frame_while_a_corner_is_dragged drags before the
asynchronous page raster has arrived on a slow runner, and the preview
(drawn from that raster) then draws no picture: 'not only at []' on
windows-latest for #3070 and #3071 (a deny.toml-only change). With a
300 ms render delay added locally, main's test fails the same way and
this one passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RUNQSPVXx3dDBabRZHAnjz
2026-10-18 07:42:07 +08:00
skylar taylor-barrick 4f6d16380a Merge pull request #2267 from MMexicann/fix/flate-fallback-output-limit
fix(filters): preserve output-limit errors in raw Flate fallback
2026-10-17 17:11:26 -06:00
FredApps 29f3a39e30 Merge main into Pages sidebar select-all fix (#2052)
Preserve both roadmap histories and current upstream XML/XFDF work.
Keep the tested sidebar implementation unchanged.
2026-10-18 00:52:46 +02:00
sanches 427cce3150 Merge remote-tracking branch 'origin/main' into i18n-id-vi 2026-10-18 01:47:43 +03:00
skylar taylor-barrick 9b4af15b21 fix(edit): read marked content that spans content streams in one pass (#3081)
reading_lines grouped the joined operators by the stream their first token
is in and walked each group on its own. A marked-content sequence opened in
one stream (its /ActualText dictionary, or the whole BDC) and closed in the
next lost its replacement text: the export read "Glyphs" where every reader
of the joined streams reads "Replacement text".

The page's operators are now walked once. Each shown text still counts as
the stream its operator starts in, and text from another stream still starts
a new line, as before.
2026-10-18 00:27:50 +02:00
skylar taylor-barrick 7b39552ff1 Merge remote-tracking branch 'origin/main' into pr2267
# Conflicts:
#	ROADMAP.md
#	docs/roadmap.md
2026-10-17 15:58:13 -06:00
skylar taylor-barrick 0ac9b8403b Merge pull request #1917 from MMexicann/fix/xfdf-preserve-attribute-whitespace
M6: preserve whitespace in XML and XFDF attributes
2026-10-17 15:45:36 -06:00
sanches c5fca1ee10 i18n: translate the plain-file-name validation literal in id, hi, ko, nl, da, sv and fi 2026-10-18 00:15:51 +03:00
alehel f0c28ffa79 Merge remote-tracking branch 'origin/main' into fix/background-hidden-by-page-backdrop
# Conflicts:
#	ROADMAP.md
2026-10-17 22:38:39 +02:00
skylar taylor-barrick 046ca7b947 Merge remote-tracking branch 'origin/main' into pr1917
# Conflicts:
#	ROADMAP.md
#	crates/xfdf/README.md
#	docs/roadmap.md
#	parity/acrobat-features.toml
2026-10-17 14:38:13 -06:00
skylar taylor-barrick 6d087c2d19 Merge remote-tracking branch 'origin/main' into pr2267
# Conflicts:
#	ROADMAP.md
#	docs/roadmap.md
2026-10-17 14:37:12 -06:00
skylar taylor-barrick be0254d708 Merge pull request #3091 from skylartaylor/deny-zbus-advisories
deny: acknowledge the new zbus unmaintained advisories
2026-10-17 14:26:40 -06:00
skylar taylor-barrick 54a45422c9 Merge pull request #2686 from MMexicann/fix/xml-form-text-nodes
M6: preserve complete plain XML form values
2026-10-17 14:19:05 -06:00
skylar taylor-barrick 43bb98eb88 fix(edit): isolate new marks from state left by content after an earlier wrapper (#3084)
place_tagged wrapped the page's content in q/Q only when no Wrap stream
existed yet. Content appended after an earlier wrapper (by another tool, or
an older OCR layer) that left a cm, a clip or text state set then moved,
hid or distorted every later header, Bates number, watermark, added text,
flattened annotation and redaction cover.

Placing a mark on top now reads the page's actual operators instead of the
/PCMark tags. When the content parses cleanly with balanced q/Q and closed
text objects and paths, the stretch from the first stream that leaves state
set is wrapped, once, at a stream boundary no comment runs into. Content
that is already self-contained gets no new wrapper, so repeated marks don't
pile up.

Content that can't be read that precisely (stray bytes, unbalanced q/Q, an
unfinished text object or path, too large) is wrapped whole as before,
rather than refusing: redaction stamps its covers after removing the text
and can't back out. A q that content leaves open is closed after it, where
closing it changes nothing already drawn.

The wrapper's close now starts with a newline, so a comment at the end of
the content before it can't swallow the Q. Removing marks strips only
wrapper pairs that end the list, keeping one that later content still
relies on, and recognises the older close bytes too.
2026-10-17 21:50:58 +02:00
skylar taylor-barrick 392406eb4a fix(content): read a comment at the end of a content stream as the renderer does (#3081)
Pieces::join separated a page's content streams with a newline, which ended
a comment left open at the end of one stream. hayro, MuPDF and Poppler join
them with a space, so the comment runs on into the next stream and hides its
first line. Edit text, object_list, the redaction audit, redaction and the
Office/HTML export therefore saw text and boxes that nothing draws, and
redacting unrelated text on the page made the hidden content visible: the
rewritten stream dropped the comment.

- Pieces::join uses a space, so every reader of the joined streams agrees
  with rendering.
- The parser records, per piece, whether a top-level comment runs into it
  and out of it (boundaries only, not every comment). A redaction rewrite
  of a piece ends an incoming comment before its first operator and leaves
  an outgoing one open, so hidden content stays hidden.
- Reading for export parses the streams joined, instead of one by one.
- The redaction tag check compares the joined streams the same way.
- Pieces::piece_of uses a binary search.
2026-10-17 21:50:58 +02:00
sanches 78b85482bb Merge remote-tracking branch 'origin/main' into i18n-id-vi 2026-10-17 22:50:13 +03:00
Osvaldo Duran MelendezandClaude Opus 5.5 1edc63907e Merge upstream main bc7a12b9 into pr/attachments: catalogs and ATTRIBUTION hashes by key (ATTRIBUTION.toml )
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 15:41:50 -04:00
skylar taylor-barrick cee48385b7 deny: acknowledge the new zbus unmaintained advisories
RUSTSEC-2026-0370/0371/0372 were published today for zvariant, zbus_names and
zvariant_derive. All three are unmaintained notices rather than vulnerabilities,
and none has a fixed release to move to. They reach the tree as the D-Bus stack
behind accesskit_unix -> atspi (Linux accessibility) and as a dev-dependency of
pdfcraft-platform, so nothing ships in the other targets' binaries.

This is why main went red today; no dependency version changed.
2026-10-17 12:57:57 -06:00
skylar taylor-barrick d9141f9336 Merge storytold/pdfcraft main; refresh ATTRIBUTION.toml translation hashes 2026-10-17 12:44:10 -06:00
skylar taylor-barrick 558a4c1230 Read the system clipboard once per right-click, and one thread at a time
The canvas asked can_paste_image() on every frame, which opens the OS
clipboard and decodes any image on it. With UI tests running in parallel,
many threads opened the Windows clipboard at once and the editing test
binary died with STATUS_HEAP_CORRUPTION.

- Ask whether there's an image to paste when a right-click opens a menu,
  not on every frame. Pasting still reads the clipboard at paste time.
- Route every arboard call through os_clipboard::with, which holds a
  process-wide lock across open, use and close.
- stale_clipboard_plain_text_does_not_paste_image no longer writes the
  real clipboard; it gets its text from the paste event.
- Run CI tests in parallel again (revert --test-threads=1).
2026-10-17 12:37:36 -06:00
alehel 6c23b7209c Merge remote-tracking branch 'origin/main' into feat/all-tools-expand-view
# Conflicts:
#	ATTRIBUTION.toml
2026-10-17 20:21:31 +02:00