Commit Graph
5 Commits
Author SHA1 Message Date
bflatastic 2af11131ef Merge main into merge/xfa2
# Conflicts:
#	crates/automation/src/tools.rs
#	crates/automation/tests/it/automation.rs
#	crates/forms/src/tests.rs
#	crates/ui-egui/src/tools/forms_ui.rs
#	parity/acrobat-features.toml
2026-11-09 20:57:05 +07:00
mtlcl410andClaude Opus 5.5 b8436dce5a M2: Symbol and ZapfDingbats stand-ins keep their standard advances (tests)
The stand-in fitting of hayro-interpret patch (67) also applies to Symbol
and ZapfDingbats (ISO 32000-2 9.6.2.2, Annex D.5 and D.6). Tests show
that their glyphs, and the check mark a check box draws for its /MK /CA
caption 4, keep the standard advance:

- symbol_dingbats_width (pdfcraft-render tests/it): Symbol alpha, beta,
  pi, Sigma, Omega, Delta, infinity, bullet and plus, and ZapfDingbats
  a20, a19, a23, a24, a71, a73, a77 and a28, drawn with no /Encoding:
  each glyph's ink lies within its standard advance and fills most of
  it, and the next glyph starts one standard advance on.
- dingbat_check_box (pdfcraft-engine tests/it): a check box with no /AP,
  /DA (/ZaDb 60 Tf 0 g) and /MK /CA (4) draws its check centred in the
  box, within its 846-unit advance and not squeezed.

The patch is renumbered (67), next after main's highest (66), and the
Tests column lists the new tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175FWj4xFhMhSH3UpMU8DSC
2026-10-30 14:20:38 +08:00
mtlcl410andClaude Opus 5.5 afdb368051 M12: XFA repeating subforms lay out more than 50 rows
A repeating subform laid out at most 50 instances, so rows 51 and on of a
long list or table (from the data, or added by a button's addInstance)
were left out. XFA 3.3, "The occur element" (p. 786): max -1 sets no
upper boundary.

The per-subform bound is now 1,000: the largest occur count the parser
reads and the most rows one script run may add (MAX_ADDED). The layout
budgets still bound the whole form. Opening a form with 1,000 one-field
rows takes about 3 s in a debug build and 2,000 rows about 13 s, so a
much larger bound would let one list stall the app. Rows past the occur
max or the bound are still reported, and the warning now names the
layout's bound when that is what cut them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0175FWj4xFhMhSH3UpMU8DSC
2026-10-29 21:24:27 +08:00
aiongg 467c8556ec fix(engine): encode each image once for Office export
Office export encoded and kept a separate copy of an image for every place
a page drew it, so a short content stream repeating Do on one large image
multiplied it into gigabytes before the writers' limits applied. Each image
object is now encoded once and its bytes shared (pdfcraft_export::Image
holds an Arc<[u8]>), distinct pictures share a 512 MiB budget whose
overflow lists the page as truncated, and RTF, which leaves pictures out,
prepares none.
2026-10-22 18:02:33 +00:00
aiongg 9526363152 Build each crate's integration tests as one binary (#4087)
* Build each crate's integration tests as one binary

Every tests/*.rs file is its own executable that links the whole crate
graph. Move each crate's test files into tests/it/ as modules of one
tests/it/main.rs, for apps/pdfcraft, apps/pdfcraft-cli, automation, cos,
crypt, engine, render, sign and ui-egui. ui-egui's ui_group binary and
the support modules move into tests/it/ too. Crates with a single test
file keep it. The test executables go from 150 to 52, and every crate
runs the same number of tests as before.

ui-egui perf keeps its own binary (own process): its frame-time budgets
would charge each measurement for the other tests running beside it.

What the move needs:
- include_str!/include_bytes! and #[path] paths gain one "../".
- ui-egui: one GPU lock in tests/it/main.rs replaces the five per-file
  ones (content, document_links, editing, fill_sign, view), so one
  process creates one wgpu device at a time. The drop-line test in ui.rs
  and the screenshot blocks behind PDFCRAFT_*_SHOT(S) and
  CRAFT_UI_DOCKING_DIR, which render without holding it, take it too.
- pdfcraft winit_wayland_scroll: the vendored winit source it compiles
  names crate::event, so that shim lives in main.rs.
- parity evidence names the new paths.

* Name the one-binary test paths in docs and comments

- READMEs, docs, ATTRIBUTION and source comments name tests/it/<file>.rs.
- The oracle README's example filters with --test it encryption::qpdf_agrees.
- pdfcraft's GPU lock comment points at the UI tests' shared lock in
  crates/ui-egui/tests/it/main.rs.
2026-10-22 11:28:58 -04:00