Skip to content

PdfCraft: An open-source PDF reader and editor written by scratch in pure Rust

Merge remote-tracking branch 'origin/main' into fix/background-hidden-by-page-backdrop

alehel911147126c32
diff --cc ATTRIBUTION.toml
index b9341385e,db3dd6124..c7fd72098
--- a/ATTRIBUTION.toml
+++ b/ATTRIBUTION.toml
@@@ -7,7 -7,7 +7,7 @@@ licence = "MIT OR Apache-2.0
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Greek UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
- sha256 = "c70caadef8f52c88dda53acae29525d06eecee2b7ff2f37dcd97fcb02ac5285a"
-sha256 = "6eee0b34db6529f26235bfc07fa1fdb9030b8e7b0b10ede271ca9242cb491919"
++sha256 = "26ba9056f4216689d309bd8c3c698e018953bdc9b9383afa7072206ae79286bc"
# ATTRIBUTION.toml: one entry per asset (AGENTS.md §1). The source of truth for provenance and licences.
# ATTRIBUTION.md is generated from this file: `cargo xtask assets --write`. Checked by `cargo xtask assets` (part of `xtask ci`).
@@@ -30,7 -30,7 +30,7 @@@ licence = "MIT OR Apache-2.0
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Simplified Chinese UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
- sha256 = "f14bc3945d397c664c0d46c624568d0525864eb7c7aba001d1d434f571e1d8c6"
-sha256 = "9870c0fb9f7198155be16adee7f45d36cb9a254af90b545a3ce5b04cbbbf24d4"
++sha256 = "1bd912e94495bef2c336f90af14c18c994a1466438fc5805e52e3cc3f1fa6066"
[[asset]]
path = "crates/ui-egui/src/i18n/zh-hant.tsv"
@@@ -41,7 -41,7 +41,7 @@@ licence = "MIT OR Apache-2.0
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Traditional Chinese UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
- sha256 = "d1087a3191cf50bb8ca75c2d01b4091fe5d0c0987da4263e69cd81f2f2b3f815"
-sha256 = "fc31e40877ce115cfb7033c57dd6acabcae3725b249364387e3fe23e04d94e5e"
++sha256 = "7bfdfd3ae806a40d1966d4c1cefa44f0b9b5f10034b7c5e729a6446e414a1b01"
[[asset]]
path = "crates/ui-egui/src/i18n/cs.tsv"
@@@ -52,7 -52,7 +52,7 @@@ licence = "MIT OR Apache-2.0
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Czech UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
- sha256 = "cb5ac03334bcbc05db290a5a5ed948c0172869bf9e64cc050a621b1a90d880cd"
-sha256 = "5de19834f293efaea68cb6b7f51a71d320391f53345f56cfebcd73dab828b665"
++sha256 = "2692063e82a568a94185a39664ab5da06cbd8b0329cca6aa00b4a5d6a55d69f3"
[[asset]]
path = "crates/ui-egui/src/i18n/pt-br.tsv"
@@@ -63,7 -63,7 +63,7 @@@ licence = "MIT OR Apache-2.0
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Brazilian Portuguese UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
- sha256 = "0592951b23cab160003cf0a4d57764a0beaea8fcdbdb2e30dac016548f80ee2e"
-sha256 = "cef0d22341d0722f029c6543fc846fce164331b7ad8f693a6754b7567b9d9e95"
++sha256 = "abd852ed86a3418735a669fb02fe13acdfd40d51b0e91f3acdf32c3ae6530b75"
[[asset]]
path = "crates/ui-egui/src/i18n/es.tsv"
@@@ -74,7 -74,7 +74,7 @@@ licence = "MIT OR Apache-2.0
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Spanish UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
- sha256 = "c6889458db78e160fe9381549d7b9be9801f42a5bb8fe8367615ebc18df01c2d"
-sha256 = "c0ca7761cbabd8096bc9af54cdf6b88b3ae0cd8210003db8b3356e2706e44fc8"
++sha256 = "63f96f0313b80d4abad65f15c0f5dbbe3591e07f63dd1ba160c0f2e771e17c4a"
[[asset]]
path = "crates/ui-egui/src/i18n/fr.tsv"
@@@ -85,7 -85,7 +85,7 @@@ licence = "MIT OR Apache-2.0
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "French UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
- sha256 = "bb2bc27d42a857ec7afce94644e5407f5676a31fd1ecceb38a4cf6cfe37d64b5"
-sha256 = "a8afd51c3296f44b0446d6b06492b1348444b3e3c448a326ad213d18ce7af714"
++sha256 = "5c7cb183dfbba4fa8d332610aa4cc2d7f31f2d41704c77b0641a6b96f9f71048"
[[asset]]
path = "crates/ui-egui/src/i18n/de.tsv"
@@@ -96,7 -96,7 +96,7 @@@ licence = "MIT OR Apache-2.0
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "German UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
- sha256 = "ab5ce70d22ed63a8a1f96c730468fabf6a411283b63120b651e2539dd4cfbdb3"
-sha256 = "7676a2dfaa7d66e2e9ef608d2d9de7f863557dcecbef6d94bafa981097405e6d"
++sha256 = "73d966644239f00e303be78d1f0973f00b54a65da761e373ab5cc98464e80676"
[[asset]]
path = "crates/ui-egui/src/i18n/te.tsv"
@@@ -107,7 -107,7 +107,7 @@@ licence = "MIT OR Apache-2.0
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Telugu UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
- sha256 = "67f95b2a38eb99af3d67833854068fad7bca4cc1214e2dd3becb25e4085a9bbd"
-sha256 = "9a22996c0308ea5b20ec5e328504cd83cbb560147763faaf0e6987f974844c29"
++sha256 = "047d97de01912a4f87740c2df0bf2880d094468dfe57c8f4e27d33219e686aa4"
[[asset]]
path = "crates/ui-egui/src/i18n/it.tsv"
@@@ -118,7 -118,7 +118,7 @@@ licence = "MIT OR Apache-2.0
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Italian UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
- sha256 = "9862c4a53240985a0fdb5acf052aec5f537f71380f8c0d29a5a4fdc6e8b5ef41"
-sha256 = "eacc972d65a2d951e94e1a8cf944638e8328f73f6c05759de6059a425f159cd7"
++sha256 = "b9eb0d2a3cc9f35b6a0e22261a2ffc43a08b1a4627ae0fd8b618ea344a26f6af"
[[asset]]
path = "crates/ui-egui/src/i18n/pl.tsv"
@@@ -129,7 -129,7 +129,7 @@@ licence = "MIT OR Apache-2.0
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Polish UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
- sha256 = "9716ac3bebc449962eb3f15ce6f9a72a2ed05535e721c04bb3c7dc1ec8577985"
-sha256 = "dfa4aa540cc7d61fa22a27a949e6eec0f78dcc5b883d0e4e004d695e460b95aa"
++sha256 = "13e9af888d96c5daeada90e688048312f4347cbea415f8af930de467253cf6be"
[[asset]]
path = "crates/ui-egui/src/i18n/ru.tsv"
@@@ -140,7 -140,7 +140,7 @@@ licence = "MIT OR Apache-2.0
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Russian UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
- sha256 = "a47c41d1e5559386f9a94444f9ec2e3a48d51d5fa587aa372ec030556c9ecd17"
-sha256 = "27e02e7bb3d378bceca76988a9dceaa68d974f57cbee962954deca6184cf62aa"
++sha256 = "f6606550f1705ecd00682ebc44238e74b570d79e206266a67247cefa93f7a877"
[[asset]]
path = "crates/ui-egui/src/i18n/hu.tsv"
@@@ -151,7 -151,7 +151,7 @@@ licence = "MIT OR Apache-2.0
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Hungarian UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
- sha256 = "911c2a48182efcce05af453803b94d6f66f7d2f37ddf1ca9b01e912f47db1a66"
-sha256 = "9675edd36c5ae54d9893fd10c4325aab664941bf714c08fbfeef9134fa42056c"
++sha256 = "986f7453dfeb6feeccc24a72537b60345eb1f7bb5be46143f68515f9550979a6"
[[asset]]
path = "crates/ui-egui/src/i18n/bg.tsv"
@@@ -162,7 -162,7 +162,7 @@@ licence = "MIT OR Apache-2.0
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Bulgarian UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
- sha256 = "66887fab11c900680136d528385f8928ad673b63baf6f171acd16c6b0245cc4a"
-sha256 = "ce18fc96f8516aa917e4a8bcfd290edec13a9800b3d1ee102e4b2a71b8467d2b"
++sha256 = "48d34433d6c17358d9f934d60735914feb4433c70c5e86712a971794345c6c81"
[[asset]]
path = "crates/ui-egui/src/i18n/kk.tsv"
@@@ -173,7 -173,7 +173,7 @@@ licence = "MIT OR Apache-2.0
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Kazakh UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
- sha256 = "0ba6933fec3aea7528cabcb68901ea5ad81bc6cb93dc9d01767ad46b5bdf00dc"
-sha256 = "286a1e2e051748eb4bcee3906918dc78d0704f8a37bde22dc50d3376d5e75017"
++sha256 = "c68c9d3e3dd0bea92c9a0e0213ac86e43ce229fffb4f8152a5fa25e2bfca6eb8"
[[asset]]
path = "crates/ui-egui/src/i18n/ja.tsv"
@@@ -184,7 -184,7 +184,7 @@@ licence = "MIT OR Apache-2.0
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Japanese UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
- sha256 = "432c818f2c78780418237d7d88dec1e268be2bf2c336ac40a11926f841f8af46"
-sha256 = "77593b7497c67f4a79cc31fa43fdd6eae11601dd87c079a8e666b25cdd9117ba"
++sha256 = "3cebc4f5753da0e15fa8d36957e0aaac2ff8272aed9e192e88e97667920045c7"
[[asset]]
path = "crates/ui-egui/src/i18n/uk.tsv"
@@@ -195,7 -195,7 +195,7 @@@ licence = "MIT OR Apache-2.0
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Ukrainian UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
- sha256 = "5c2f293d7a3c124ad6fbb19ea63b37711ae76ec5e0180bd466586c739a108094"
-sha256 = "d7d93a03f22ab380696f69b20b12104bf30e78c4440b683df63594af716894e2"
++sha256 = "55eec8795d88a5e61476a9e3fc198303f04300b49198445a4a7156e3f44f68b2"
[[asset]]
path = "crates/ui-egui/src/i18n/ar.tsv"
@@@ -206,7 -206,7 +206,7 @@@ licence = "MIT OR Apache-2.0
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Arabic UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
- sha256 = "7d12586bb4cb268d4e353dcebf20a4a190737821a34a2e8fab05c1d119b5fc24"
-sha256 = "889a0d0a9ea53ca0a818c2ba672c053c232d2cca140f8d63127353e6f36505fe"
++sha256 = "164436e95395bd0cbed63fb7e419a8c2a960252b03c0bff8cb827b968816f895"
[[asset]]
path = "crates/ui-egui/src/i18n/tr.tsv"
@@@ -217,7 -217,7 +217,7 @@@ licence = "MIT OR Apache-2.0
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Turkish UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
- sha256 = "74bff0a4ed87b103df409309ba3898403d8cd1d29934583d527ba9327c4edf9c"
-sha256 = "bae8b21651ae2a69c71c91b69ba79727254dbfb078c1be312a13383332934927"
++sha256 = "d59cfeba4163af3febcf60127e7f8128318d3129868c3614d8aa689239e80f22"
[[asset]]
path = "crates/ui-egui/src/i18n/lt.tsv"
@@@ -228,7 -228,7 +228,7 @@@ licence = "MIT OR Apache-2.0
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Lithuanian UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
- sha256 = "efe5caf1ef8b313a5728ec9a20596d523c9cebb847ed3f20fa5a81dec9e7a9f2"
-sha256 = "7fa70f68a9fa24d0b1cac05fe3aaabaeaca9750c57416124bd317a4eda806d5a"
++sha256 = "e9b1cffd8900390f98d325a0c9fcfd30e113bfe57a265bba274d4826520979de"
[[asset]]
@@@ -3352,7 -3352,7 +3352,7 @@@ licence = "MIT OR Apache-2.0
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Vietnamese UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
- sha256 = "19283a0a5ae0636e3539fa143076f811b6ea602338b14d6214694d61f70a337b"
-sha256 = "95b5fc6d10f7bc8371688772741870448de716fa2dd9af62fdfe4e009d269b45"
++sha256 = "1c1bbee82bc1a1e47bff99f0a321c80508442b47af243ced7f81cc0a1d146be4"
[[asset]]
path = "crates/ui-egui/src/i18n/sl.tsv"
@@@ -3363,7 -3363,7 +3363,7 @@@ licence = "MIT OR Apache-2.0
licence_file = "LICENSE-MIT"
kind = "translation"
usage = "Slovene UI strings, compiled in by crates/ui-egui/src/i18n/mod.rs"
- sha256 = "cd64ce98d111cc3cf5a0daa2874ffbce78f314e8d1cba3b2297983151b600864"
-sha256 = "3ac2b113045b7e399dd6d9ddb7773e5b0874c8b43c2ba4cca5854598a2a7ba92"
++sha256 = "59527f6e73ff2e10aa9aefe96bf32b162e2d75085e6f69b6be4ffcc4779d9b96"
[[asset]]
diff --cc ROADMAP.md
index 5108635d1,a8aefb06d..4ca771093
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@@ -161,8 -164,11 +164,12 @@@ Ranked; detail and the full milestone t
| 8 | 1.0 polish: performance, right-to-left, missing languages, keyboard-only (M14) | 55–95 |
## Progress log
+ - **2026-10-15 (M7, Edit text caret):** In a text region that mixes sizes (a 24 pt title over 12 pt lines), the inline editor's caret on a small row was as tall as the region's first size and reached into the row below: egui draws the caret at least one row of the text field's font tall, and that font had the paragraph's first size. The field's font is now half the region's smallest size, so each row's own height decides. Kittest regression; checked in the app on a real document. Estimates unchanged.
+ - **2026-10-16 (M3, #2781):** The Pages panel follows the current page, as Acrobat's page thumbnails do: going to a page whose thumbnail is out of sight (scrolling, Page Down, Go to page, a bookmark) scrolls the panel just enough to show it. A thumbnail already in view, or clicked, leaves the panel where it is, and a page change while the user scrolls the panel or drags thumbnails does not move it. Estimates unchanged.
+ - **2026-10-16 (M12, #1645):** CLI info, text and render use the engine's dynamic XFA layout rather than placeholder pages. Synthetic two-page and encrypted-form regressions cover counts, text, pixels, copy permissions and unchanged input bytes. Estimates unchanged.
+ - **2026-10-18 (M3, #3149):** Page replacement cancels render demand collected for the previous geometry; all viewer raster upload paths reject empty or oversized textures before cache eviction. Synthetic regressions reproduce the reported 1880×2350 upload at a 2048 limit, retain cached images and unsaved edits, and resume bounded backdrops and tiles. Estimates unchanged.
- **2026-10-18 (M8, #1350):** Integrated current main while preserving content-stream comment boundaries. Hidden-text cleanup retires unused named replacement descriptions on rewritten pages and forms, including inherited/shared resource holders, without removing descriptions still used by surviving content. Synthetic saved-byte and preservation regressions cover the cleanup. Estimates unchanged.
+- **2026-10-16 (M7, Add Background):** A background added behind a page that paints its own opaque white backdrop (browsers' Save as PDF, print drivers) was hidden completely, so the tool looked broken. The dialog now detects such pages and offers to replace the backdrop (on by default): the one fill becomes `n` in a per-page copy of its stream, and Remove background puts the original back unless the copy was edited since. Scanned pages are warned about, not touched. New `doc_backdrops` tool; `doc_background` takes `replace_backdrop`. The default colour is a visible light yellow and the preview shows text over it. Acrobat's own behaviour on such pages is unobserved. Estimates unchanged.
- **2026-10-15 (M6, AcroForm XML text):** Plain AcroForm XML imports retain all direct text around comments and processing instructions, including CDATA and character references. Synthetic regressions verify exact values and unknown catalog data after incremental and full save/reopen. Nested-element and XFA interpretation are unchanged. Estimates unchanged.
- **2026-10-15 (M6, #1917 refresh):** Integrated upstream `99941daa` while retaining the XML/XFDF attribute whitespace correction and all upstream progress. Only independent documentation conflicts required resolution; focused production and test files are unchanged from the previously green CI head. Estimates unchanged.
- **2026-10-15 (M1, #2267 refresh):** Integrated upstream `99941daa` while retaining the raw-deflate fallback correction and all upstream progress. Only independent documentation conflicts required resolution; focused production and test files are unchanged from the previously green CI head. Estimates unchanged.