PdfCraft: An open-source PDF reader and editor written by scratch in pure Rust
M3: type an exact zoom into the rail's zoom field (#1755)
Benjamin Michel652514095535
diff --git a/ATTRIBUTION.toml b/ATTRIBUTION.tomlindex 80a5e0f54..db3dd6124 100644--- a/ATTRIBUTION.toml+++ b/ATTRIBUTION.toml@@ -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 = "a3234684d5318ce38213c79533d3eebb9c635497ba9e00fb9ca7ebe2fad9d73d"+sha256 = "6eee0b34db6529f26235bfc07fa1fdb9030b8e7b0b10ede271ca9242cb491919"# 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 @@ 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 = "c5e0206846b009bcb366d092c3d64fd8b9e42d29d5406fb73ae36ecb1f2083d5"+sha256 = "9870c0fb9f7198155be16adee7f45d36cb9a254af90b545a3ce5b04cbbbf24d4"[[asset]]path = "crates/ui-egui/src/i18n/zh-hant.tsv"@@ -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 = "7b98d720bc0c433d62b7b4fb4a5b79d3e74111590c29a59a51f3944e5e0622a5"+sha256 = "fc31e40877ce115cfb7033c57dd6acabcae3725b249364387e3fe23e04d94e5e"[[asset]]path = "crates/ui-egui/src/i18n/cs.tsv"@@ -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 = "cb332907792d4aa760ca9862160e24a7b469afdbcfb93235e99deb8d58604ae2"+sha256 = "5de19834f293efaea68cb6b7f51a71d320391f53345f56cfebcd73dab828b665"[[asset]]path = "crates/ui-egui/src/i18n/pt-br.tsv"@@ -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 = "ebd3a12e471ba9d9a69e6532fbac2d027dec3c91b79cdfbb1c6c386d13de3bd6"+sha256 = "cef0d22341d0722f029c6543fc846fce164331b7ad8f693a6754b7567b9d9e95"[[asset]]path = "crates/ui-egui/src/i18n/es.tsv"@@ -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 = "f5e0553165ab0223bfbc809b1630170d1af11d6546ae5a682d4090104b6e4a05"+sha256 = "c0ca7761cbabd8096bc9af54cdf6b88b3ae0cd8210003db8b3356e2706e44fc8"[[asset]]path = "crates/ui-egui/src/i18n/fr.tsv"@@ -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 = "dd2171a0a940a84e512fd6408a11cddf104be897ec4ab670c5ef6f1781ccb671"+sha256 = "a8afd51c3296f44b0446d6b06492b1348444b3e3c448a326ad213d18ce7af714"[[asset]]path = "crates/ui-egui/src/i18n/de.tsv"@@ -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 = "1b9b3d0d6dab626c3acb8c9aa64d64e56b98eb3f2faf71dcb1957067e72706db"+sha256 = "7676a2dfaa7d66e2e9ef608d2d9de7f863557dcecbef6d94bafa981097405e6d"[[asset]]path = "crates/ui-egui/src/i18n/te.tsv"@@ -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 = "668f23f4095120343e3f0910dc8f5844765370fae40400c48d685cad20dcf60e"+sha256 = "9a22996c0308ea5b20ec5e328504cd83cbb560147763faaf0e6987f974844c29"[[asset]]path = "crates/ui-egui/src/i18n/it.tsv"@@ -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 = "02f3fd4b2721b0ea9c01c99d477a0339a28180514568179d3fc420e7fb81c671"+sha256 = "eacc972d65a2d951e94e1a8cf944638e8328f73f6c05759de6059a425f159cd7"[[asset]]path = "crates/ui-egui/src/i18n/pl.tsv"@@ -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 = "26eb438c309d34e55eba959a21f139db91fa5fd1d6d4b7c3d1cd0fa79a60a5b0"+sha256 = "dfa4aa540cc7d61fa22a27a949e6eec0f78dcc5b883d0e4e004d695e460b95aa"[[asset]]path = "crates/ui-egui/src/i18n/ru.tsv"@@ -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 = "c04b6d0320bce999b33bd189bffcec8a196d4169e56cc65675dc920c5a671dac"+sha256 = "27e02e7bb3d378bceca76988a9dceaa68d974f57cbee962954deca6184cf62aa"[[asset]]path = "crates/ui-egui/src/i18n/hu.tsv"@@ -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 = "37b042977d934b0b550e5f52faa5d90abbcb9e7ff61ff9588021610ce709e474"+sha256 = "9675edd36c5ae54d9893fd10c4325aab664941bf714c08fbfeef9134fa42056c"[[asset]]path = "crates/ui-egui/src/i18n/bg.tsv"@@ -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 = "3d1f1d2558eec1271fa653bc38616feeefc6559deeb2a0cdbf07d67634e9ac97"+sha256 = "ce18fc96f8516aa917e4a8bcfd290edec13a9800b3d1ee102e4b2a71b8467d2b"[[asset]]path = "crates/ui-egui/src/i18n/kk.tsv"@@ -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 = "03071249bd6c13f79da72262415e484fb1aa36098a37a49094b9dab58cebc4e2"+sha256 = "286a1e2e051748eb4bcee3906918dc78d0704f8a37bde22dc50d3376d5e75017"[[asset]]path = "crates/ui-egui/src/i18n/ja.tsv"@@ -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 = "c0ba73b27b95b275f5eebc040ab1c3c6c3b227c63e1c637b4cdb27d0a9264a8b"+sha256 = "77593b7497c67f4a79cc31fa43fdd6eae11601dd87c079a8e666b25cdd9117ba"[[asset]]path = "crates/ui-egui/src/i18n/uk.tsv"@@ -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 = "e3af76714ee9899328a453ec83195f4dc462fe48ba445fbe3688c777e74bc9dc"+sha256 = "d7d93a03f22ab380696f69b20b12104bf30e78c4440b683df63594af716894e2"[[asset]]path = "crates/ui-egui/src/i18n/ar.tsv"@@ -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 = "0855d7f785c433799da83400ebc932f987eb543008486bc4f553aadb4102c2ba"+sha256 = "889a0d0a9ea53ca0a818c2ba672c053c232d2cca140f8d63127353e6f36505fe"[[asset]]path = "crates/ui-egui/src/i18n/tr.tsv"@@ -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 = "884ab18d60db52f65cd0e30530e196c73c0e627f450bc948517e2f4b7deeb04b"+sha256 = "bae8b21651ae2a69c71c91b69ba79727254dbfb078c1be312a13383332934927"[[asset]]path = "crates/ui-egui/src/i18n/lt.tsv"@@ -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 = "c805a2c6da08e77a9a7455856d82c168cf6f353d96e1dc140fcc8898f12ba538"+sha256 = "7fa70f68a9fa24d0b1cac05fe3aaabaeaca9750c57416124bd317a4eda806d5a"[[asset]]@@ -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 = "11619064ae9edaeee5d601b7008e40095a40375a3e1a298155d59cb758fe7d34"+sha256 = "95b5fc6d10f7bc8371688772741870448de716fa2dd9af62fdfe4e009d269b45"[[asset]]path = "crates/ui-egui/src/i18n/sl.tsv"@@ -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 = "89f2c7495cfb0fc9d36d35b95c056dbeda18ccae521250babac719ff5df62d89"+sha256 = "3ac2b113045b7e399dd6d9ddb7773e5b0874c8b43c2ba4cca5854598a2a7ba92"[[asset]]diff --git a/ROADMAP.md b/ROADMAP.mdindex d81487afb..0d1cfee90 100644--- a/ROADMAP.md+++ b/ROADMAP.md@@ -183,6 +183,7 @@ Ranked; detail and the full milestone table in [docs/roadmap.md](docs/roadmap.md- **2026-10-15 (M14, gap 24):** `misc.localization` and `misc.installers` move from planned to partial. Localization: 22 catalogs ship, but Chinese shows tofu in releases, Telugu has no release font and Arabic is not mirrored. Installers: macOS and Windows releases are signed, Linux packages are not. The Acrobat menu diff itself remains open. Estimates unchanged.- **2026-10-13 (G14, Vietnamese localization):** Added Vietnamese (`vi`, Tiếng Việt) as an interface and date language with a 2,591-entry catalog (`plural_none`) covering 100% of the current localizable key union (plus `theme`/`Appearance`). Locale tags `vi` / `vi-VN` / `vi_VN.UTF-8` resolve; calendar months use numeric `Tháng 1`…`12` / `tháng 1`…`12`. Native-speaker community review recorded. The twelve-language localization mean moves from ≈59% to ≈68%; weighted readiness ≈49% → ≈50%. Status stays `partial`: engine/OS details, document contents, filenames, CLI/MCP and external help stay outside the catalog by design.+- **2026-10-13 (M3, typed zoom):** The right rail's zoom percentage is an editable field: type 150, 150% or 62.5 % and press Enter, Escape discards, and nonsense keeps the current zoom. The control channel's zoom option shares its parser, which now refuses zero, negative and non-finite values.- **2026-10-13 (M6, data exchange fidelity):** XML and XFDF exports preserve tabs and line breaks in field names and comment metadata using character references. Saved-PDF regressions cover distinct names that XML would normalize to the same attribute value, restored field values and replacement of the original comment identities. Estimates unchanged.- **2026-10-14 (M1, Flate fallback):** Raw deflate whose first bytes resemble a zlib header no longer loses a decoding-limit error during fallback. Strict and tolerant filter regressions and a COS stream regression cover refusal at the caller limit and successful decoding within it. No parity status or estimate changes.diff --git a/crates/ui-egui/src/canvas.rs b/crates/ui-egui/src/canvas.rsindex 6148c2748..855361f6f 100644--- a/crates/ui-egui/src/canvas.rs+++ b/crates/ui-egui/src/canvas.rs@@ -1516,6 +1516,13 @@ impl DocView {}}+ /// A zoom typed as a percentage ("150", "150%", " 62.5 % ") as a zoom factor; `None` unless it is a+ /// finite, positive number. `set_zoom` clamps it to the supported range.+ pub fn parse_zoom_percent(typed: &str) -> Option<f32> {+ let percent = typed.trim().trim_end_matches('%').trim_end().parse::<f32>().ok()?;+ (percent.is_finite() && percent > 0.0).then_some(percent / 100.0)+ }+/// Standard zoom steps (as in Acrobat's zoom menu).pub fn zoom_step(&mut self, up: bool) {const STEPS: [f32; 17] = [0.1, 0.25, 0.33, 0.5, 0.66, 0.75, 1.0, 1.25, 1.5, 2.0, 3.0, 4.0, 6.0, 8.0, 12.0, 16.0, 32.0];@@ -5156,6 +5163,16 @@ mod tests {use super::*;+ #[test]+ fn typed_zoom_percentages_parse() {+ for (typed, zoom) in [("150", 1.5), ("150%", 1.5), (" 62.5 % ", 0.625), ("6400%", 64.0)] {+ assert_eq!(DocView::parse_zoom_percent(typed), Some(zoom), "{typed}");+ }+ for typed in ["", "%", "abc", "0", "-50", "NaN", "inf", "1e40", "150%%x", "%150"] {+ assert_eq!(DocView::parse_zoom_percent(typed), None, "{typed}");+ }+ }+/// A rotated (landscape) page is drawn as wide as the cell allows and centred in the picture/// area, as Acrobat draws it, not as a small strip pinned to the top; a portrait page still/// fills the area's height; neither covers the checkbox corner or the label below.diff --git a/crates/ui-egui/src/chrome.rs b/crates/ui-egui/src/chrome.rsindex 84e62622f..fb9e0a7c0 100644--- a/crates/ui-egui/src/chrome.rs+++ b/crates/ui-egui/src/chrome.rs@@ -694,10 +694,36 @@ pub fn right_rail(app: &mut PdfCraftApp, ui: &mut egui::Ui) {view.fit = if view.fit == Fit::Width { Fit::Page } else { Fit::Width };view.goto = Some((view.current, 0.0));}- let zoom = format!("{:.0}%", view.zoom * 100.0);- ui.allocate_ui_with_layout(vec2(40.0, 16.0), Layout::top_down(Align::Center), |ui| {- ui.label(egui::RichText::new(zoom).font(theme::medium(11.0)).color(t.text_muted));- });+ let id = egui::Id::new("zoom-input");+ let draft = id.with("draft");+ let mut typed = ui.data(|d| d.get_temp::<String>(draft)).unwrap_or_else(|| format!("{:.0}%", view.zoom * 100.0));+ let edit = egui::TextEdit::singleline(&mut typed)+ .id(id)+ .desired_width(40.0)+ .horizontal_align(Align::Center)+ .font(theme::medium(11.0))+ .text_color(t.text_muted)+ .frame(egui::Frame::NONE)+ .margin(vec2(2.0, 2.0));+ let r = ui.add(edit).on_hover_text(tl!("Zoom — type a percentage and press Enter"));+ ui.ctx().accesskit_node_builder(id, |node| node.set_label(tl!("Zoom")));+ if r.gained_focus() {+ let mut state = egui::TextEdit::load_state(ui.ctx(), id).unwrap_or_default();+ let all = egui::text::CCursorRange::two(egui::text::CCursor::new(0), egui::text::CCursor::new(typed.chars().count()));+ state.cursor.set_char_range(Some(all));+ state.store(ui.ctx(), id);+ }+ if r.has_focus() {+ ui.data_mut(|d| d.insert_temp(draft, typed.clone()));+ } else {+ ui.data_mut(|d| d.remove::<String>(draft));+ if r.lost_focus()+ && ui.input(|i| i.key_pressed(egui::Key::Enter))+ && let Some(zoom) = DocView::parse_zoom_percent(&typed)+ {+ view.set_zoom(zoom);+ }+ }ui.add_space(6.0);if icons::button(ui, "chevron-down", 30.0, false, tl!("Next page")).clicked() {view.step_page(true);diff --git a/crates/ui-egui/src/i18n/ar.tsv b/crates/ui-egui/src/i18n/ar.tsvindex 246a26fa6..8697887e1 100644--- a/crates/ui-egui/src/i18n/ar.tsv+++ b/crates/ui-egui/src/i18n/ar.tsv@@ -162,6 +162,7 @@Next page الصفحة التاليةPrevious page الصفحة السابقةCurrent page — type a page number or label (such as iv) and press Enter الصفحة الحالية — اكتب رقم صفحة أو تسميتها (مثل iv) ثم اضغط Enter+ Zoom — type a percentage and press Enter التكبير — اكتب نسبة مئوية واضغط EnterWelcome to PdfCraft مرحبًا بك في PdfCraftAn open-source PDF workbench — local, private, and scriptable. منضدة عمل مفتوحة المصدر لملفات PDF — محلية وخاصة وقابلة للبرمجة.Join the ArtCraft community انضم إلى مجتمع ArtCraftdiff --git a/crates/ui-egui/src/i18n/bg.tsv b/crates/ui-egui/src/i18n/bg.tsvindex a39489aed..813a2c7ae 100644--- a/crates/ui-egui/src/i18n/bg.tsv+++ b/crates/ui-egui/src/i18n/bg.tsv@@ -1123,6 +1123,7 @@Next page Следваща страницаPrevious page Предишна страницаCurrent page — type a page number or label (such as iv) and press Enter Текуща страница — въведете номер или етикет на страница (например iv) и натиснете Enter+ Zoom — type a percentage and press Enter Мащаб — въведете процент и натиснете EnterOpen a PDF ({key}) Отвори PDF файл ({key})Dark gray theme Тъмносива темаLight theme Светла темаdiff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsvindex 3b7c677e0..993632552 100644--- a/crates/ui-egui/src/i18n/cs.tsv+++ b/crates/ui-egui/src/i18n/cs.tsv@@ -279,6 +279,7 @@ key Space MezerníkNext page Další stránkaPrevious page Předchozí stránkaCurrent page — type a page number or label (such as iv) and press Enter Aktuální stránka — zadejte číslo nebo označení stránky (třeba iv) a stiskněte Enter+ Zoom — type a percentage and press Enter Lupa — zadejte procenta a stiskněte EnterWelcome to PdfCraft Vítá vás PdfCraftAn open-source PDF workbench — local, private, and scriptable. Open-source dílna pro PDF — lokální, soukromá a skriptovatelná.Join the ArtCraft community Připojte se ke komunitě ArtCraftdiff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsvindex c98c40561..4d9207eb9 100644--- a/crates/ui-egui/src/i18n/de.tsv+++ b/crates/ui-egui/src/i18n/de.tsv@@ -135,6 +135,7 @@Next page Nächste SeitePrevious page Vorherige SeiteCurrent page — type a page number or label (such as iv) and press Enter Aktuelle Seite – gib eine Seitenzahl oder -beschriftung ein (z. B. iv) und drücke die Eingabetaste+ Zoom — type a percentage and press Enter Zoom – gib einen Prozentwert ein und drücke die EingabetasteWelcome to PdfCraft Willkommen bei PdfCraftAn open-source PDF workbench — local, private, and scriptable. Eine Open-Source-PDF-Werkbank – lokal, privat und skriptfähig.Join the ArtCraft community Tritt der ArtCraft-Community beidiff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsvindex 9be3e19c2..06fe2b540 100644--- a/crates/ui-egui/src/i18n/el.tsv+++ b/crates/ui-egui/src/i18n/el.tsv@@ -282,6 +282,7 @@Flatten Fill & Sign when saving Ενσωμάτωση συμπληρώσεων και υπογραφών κατά την αποθήκευσηText, marks and signatures become part of the page. Other comments stay editable. Το κείμενο, τα σημάδια και οι υπογραφές γίνονται μέρος της σελίδας. Τα υπόλοιπα σχόλια παραμένουν επεξεργάσιμα.Current page — type a page number or label (such as iv) and press Enter Τρέχουσα σελίδα — πληκτρολογήστε αριθμό ή ετικέτα σελίδας (π.χ. iv) και πατήστε Enter+ Zoom — type a percentage and press Enter Ζουμ — πληκτρολογήστε ένα ποσοστό και πατήστε EnterFiles you open in PdfCraft appear here. Drop a PDF anywhere to open it. Τα αρχεία που ανοίγετε στο PdfCraft εμφανίζονται εδώ. Σύρετε ένα PDF οπουδήποτε για να το ανοίξετε.Scripts run in a sandbox without file or network access. With JavaScript off, Acrobat's standard format, validate and calculate functions still work. Τα σενάρια εκτελούνται σε απομονωμένο περιβάλλον χωρίς πρόσβαση σε αρχεία ή δίκτυο. Με απενεργοποιημένη τη JavaScript, οι τυπικές λειτουργίες μορφοποίησης, επικύρωσης και υπολογισμού του Acrobat εξακολουθούν να λειτουργούν.Move up Μετακίνηση πάνωdiff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsvindex 6a48611a3..79c668992 100644--- a/crates/ui-egui/src/i18n/es.tsv+++ b/crates/ui-egui/src/i18n/es.tsv@@ -158,6 +158,7 @@Next page Página siguientePrevious page Página anteriorCurrent page — type a page number or label (such as iv) and press Enter Página actual: escribe un número o una etiqueta de página (por ejemplo, iv) y pulsa Intro+ Zoom — type a percentage and press Enter Zoom: escribe un porcentaje y pulsa IntroWelcome to PdfCraft Te damos la bienvenida a PdfCraftAn open-source PDF workbench — local, private, and scriptable. Un banco de trabajo PDF de código abierto: local, privado y automatizable.Join the ArtCraft community Únete a la comunidad de ArtCraftdiff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsvindex 0de88637a..9bdcf0bc8 100644--- a/crates/ui-egui/src/i18n/fr.tsv+++ b/crates/ui-egui/src/i18n/fr.tsv@@ -135,6 +135,7 @@Next page Page suivantePrevious page Page précédenteCurrent page — type a page number or label (such as iv) and press Enter Page actuelle — saisissez un numéro ou une étiquette de page (comme iv) et appuyez sur Entrée+ Zoom — type a percentage and press Enter Zoom — saisissez un pourcentage et appuyez sur EntréeWelcome to PdfCraft Bienvenue dans PdfCraftAn open-source PDF workbench — local, private, and scriptable. Un atelier PDF open source — local, privé et automatisable.Join the ArtCraft community Rejoindre la communauté ArtCraftdiff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsvindex 2d7dd82a1..d537677c7 100644--- a/crates/ui-egui/src/i18n/hu.tsv+++ b/crates/ui-egui/src/i18n/hu.tsv@@ -133,6 +133,7 @@Next page Következő oldalPrevious page Előző oldalCurrent page — type a page number or label (such as iv) and press Enter Aktuális oldal — írj be egy oldalszámot vagy címkét (például iv), majd nyomd meg az Entert+ Zoom — type a percentage and press Enter Nagyítás – írjon be egy százalékértéket, és nyomja meg az EntertWelcome to PdfCraft Üdvözöljük a PdfCraftbanAn open-source PDF workbench — local, private, and scriptable. Nyílt forráskódú PDF-munkapad — helyi, privát és parancsfájlokkal vezérelhető.Join the ArtCraft community Csatlakozz az ArtCraft közösséghezdiff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsvindex 169533374..35cba7a41 100644--- a/crates/ui-egui/src/i18n/it.tsv+++ b/crates/ui-egui/src/i18n/it.tsv@@ -159,6 +159,7 @@Next page Pagina successivaPrevious page Pagina precedenteCurrent page — type a page number or label (such as iv) and press Enter Pagina corrente: digita un numero o un'etichetta di pagina (ad esempio iv) e premi Invio+ Zoom — type a percentage and press Enter Zoom: digita una percentuale e premi InvioWelcome to PdfCraft Benvenuto in PdfCraftAn open-source PDF workbench — local, private, and scriptable. Un banco di lavoro PDF open source: locale, riservato e programmabile.Join the ArtCraft community Unisciti alla community di ArtCraftdiff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsvindex c86303174..e845a736d 100644--- a/crates/ui-egui/src/i18n/ja.tsv+++ b/crates/ui-egui/src/i18n/ja.tsv@@ -162,6 +162,7 @@Next page 次のページPrevious page 前のページCurrent page — type a page number or label (such as iv) and press Enter 現在のページ:ページ番号またはラベル(例:iv)を入力して Enter+ Zoom — type a percentage and press Enter ズーム — パーセンテージを入力して Enter キーを押しますWelcome to PdfCraft PdfCraft へようこそAn open-source PDF workbench — local, private, and scriptable. ローカルで処理し、プライバシーを守る、スクリプト対応のオープンソース PDF ツール。Join the ArtCraft community ArtCraft コミュニティに参加diff --git a/crates/ui-egui/src/i18n/kk.tsv b/crates/ui-egui/src/i18n/kk.tsvindex 64a4ea26f..9acb4ec1b 100644--- a/crates/ui-egui/src/i18n/kk.tsv+++ b/crates/ui-egui/src/i18n/kk.tsv@@ -123,6 +123,7 @@Next page Келесі бетPrevious page Алдыңғы бетCurrent page — type a page number or label (such as iv) and press Enter Ағымдағы бет — бет нөмірін немесе белгісін (мысалы, iv) теріңіз де, Enter пернесін басыңыз+ Zoom — type a percentage and press Enter Масштаб — пайызды енгізіп, Enter пернесін басыңызWelcome to PdfCraft PdfCraft-ге қош келдіңізAn open-source PDF workbench — local, private, and scriptable. Ашық бастапқы кодты PDF жұмыс орны — жергілікті, жеке әрі скрипттерді қолдайтын.Join the ArtCraft community ArtCraft қауымдастығына қосылыңызdiff --git a/crates/ui-egui/src/i18n/lt.tsv b/crates/ui-egui/src/i18n/lt.tsvindex d98befcf4..d1dfc3304 100644--- a/crates/ui-egui/src/i18n/lt.tsv+++ b/crates/ui-egui/src/i18n/lt.tsv@@ -431,6 +431,7 @@Current page Dabartinis puslapisCurrent page ({n}) Dabartinis puslapis ({n})Current page — type a page number or label (such as iv) and press Enter Dabartinis puslapis — įveskite puslapio numerį arba žymą (pvz., iv) ir paspauskite „Enter“+ Zoom — type a percentage and press Enter Mastelis – įveskite procentus ir paspauskite EnterCustom PasirinktinisCustom scale: Pasirinktinis mastelis:Custom text: Pasirinktinis tekstas:diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsvindex e8df52794..c432a6a92 100644--- a/crates/ui-egui/src/i18n/pl.tsv+++ b/crates/ui-egui/src/i18n/pl.tsv@@ -158,6 +158,7 @@Next page Następna stronaPrevious page Poprzednia stronaCurrent page — type a page number or label (such as iv) and press Enter Bieżąca strona — wpisz numer lub etykietę strony (np. iv) i naciśnij Enter+ Zoom — type a percentage and press Enter Powiększenie — wpisz wartość procentową i naciśnij EnterWelcome to PdfCraft Witamy w PdfCraftAn open-source PDF workbench — local, private, and scriptable. Otwarty zestaw narzędzi do PDF — lokalny, prywatny i obsługujący skrypty.Join the ArtCraft community Dołącz do społeczności ArtCraftdiff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsvindex dbefb9d04..89ff80f9d 100644--- a/crates/ui-egui/src/i18n/pt-br.tsv+++ b/crates/ui-egui/src/i18n/pt-br.tsv@@ -1067,6 +1067,7 @@Next page Próxima páginaPrevious page Página anteriorCurrent page — type a page number or label (such as iv) and press Enter Página atual — digite o número da página ou rótulo (como iv) e pressione Enter+ Zoom — type a percentage and press Enter Zoom — digite uma porcentagem e pressione EnterOpen a PDF ({key}) Abrir um PDF ({key})Dark gray theme Tema cinza escuroLight theme Tema clarodiff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsvindex d5cd9d6cb..73f21aa0d 100644--- a/crates/ui-egui/src/i18n/ru.tsv+++ b/crates/ui-egui/src/i18n/ru.tsv@@ -155,6 +155,7 @@Next page Следующая страницаPrevious page Предыдущая страницаCurrent page — type a page number or label (such as iv) and press Enter Текущая страница — введите номер или метку страницы (например, iv) и нажмите Enter+ Zoom — type a percentage and press Enter Масштаб — введите процент и нажмите EnterWelcome to PdfCraft Добро пожаловать в PdfCraftAn open-source PDF workbench — local, private, and scriptable. Открытый PDF-редактор — локальный, приватный и программируемый.Join the ArtCraft community Присоединяйтесь к сообществу ArtCraftdiff --git a/crates/ui-egui/src/i18n/sl.tsv b/crates/ui-egui/src/i18n/sl.tsvindex 560450c25..dd169bc96 100644--- a/crates/ui-egui/src/i18n/sl.tsv+++ b/crates/ui-egui/src/i18n/sl.tsv@@ -519,6 +519,7 @@Current page Trenutna stranCurrent page ({n}) Trenutna stran ({n})Current page — type a page number or label (such as iv) and press Enter Trenutna stran — vnesite številko ali oznako strani (npr. iv) in pritisnite Enter+ Zoom — type a percentage and press Enter Povečava – vnesite odstotek in pritisnite EnterCustom Po meriCustom scale: Merilo po meri:Custom stamps arrive on the web with file pickers for images Lastni žigi bodo v spletni različici na voljo z izbirniki slikovnih datotekdiff --git a/crates/ui-egui/src/i18n/te.tsv b/crates/ui-egui/src/i18n/te.tsvindex c3900c825..47aee36f8 100644--- a/crates/ui-egui/src/i18n/te.tsv+++ b/crates/ui-egui/src/i18n/te.tsv@@ -139,6 +139,7 @@ comment menu Edit సవరించుNext page తదుపరి పేజీPrevious page మునుపటి పేజీCurrent page — type a page number or label (such as iv) and press Enter ప్రస్తుత పేజీ — పేజీ సంఖ్యను లేదా లేబుల్ను (iv వంటిది) టైప్ చేసి Enter నొక్కండి+ Zoom — type a percentage and press Enter జూమ్ — శాతాన్ని టైప్ చేసి Enter నొక్కండిWelcome to PdfCraft PdfCraftకు స్వాగతంAn open-source PDF workbench — local, private, and scriptable. ఓపెన్-సోర్స్ PDF వర్క్బెంచ్ — మీ కంప్యూటర్లోనే నడుస్తుంది, గోప్యంగా ఉంటుంది, స్క్రిప్ట్లతో ఆటోమేట్ చేయవచ్చు.Join the ArtCraft community ArtCraft కమ్యూనిటీలో చేరండిdiff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsvindex bec543b02..95ca0b608 100644--- a/crates/ui-egui/src/i18n/tr.tsv+++ b/crates/ui-egui/src/i18n/tr.tsv@@ -120,6 +120,7 @@Next page Sonraki sayfaPrevious page Önceki sayfaCurrent page — type a page number or label (such as iv) and press Enter Geçerli sayfa — bir sayfa numarası veya etiketi (örneğin iv) yazıp Enter'a basın+ Zoom — type a percentage and press Enter Yakınlaştırma — bir yüzde yazıp Enter tuşuna basınWelcome to PdfCraft PdfCraft'a Hoş GeldinizAn open-source PDF workbench — local, private, and scriptable. Açık kaynaklı bir PDF çalışma alanı — yerel, gizli ve komut dosyalarıyla yönetilebilir.Join the ArtCraft community ArtCraft topluluğuna katılındiff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsvindex 379e47317..7993a0618 100644--- a/crates/ui-egui/src/i18n/uk.tsv+++ b/crates/ui-egui/src/i18n/uk.tsv@@ -160,6 +160,7 @@Next page Наступна сторінкаPrevious page Попередня сторінкаCurrent page — type a page number or label (such as iv) and press Enter Поточна сторінка — введіть номер або позначку сторінки (наприклад iv) і натисніть Enter+ Zoom — type a percentage and press Enter Масштаб — введіть відсоток і натисніть EnterWelcome to PdfCraft Вітаємо в PdfCraftAn open-source PDF workbench — local, private, and scriptable. Відкритий інструментарій для PDF — локальний, приватний і з підтримкою сценаріїв.Join the ArtCraft community Приєднатися до спільноти ArtCraftdiff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsvindex b68d6f61e..bae599bf6 100644--- a/crates/ui-egui/src/i18n/vi.tsv+++ b/crates/ui-egui/src/i18n/vi.tsv@@ -15,6 +15,7 @@Zoom Thu phóngActual size Kích thước thựcZoom to page level Thu phóng vừa trang+ Zoom — type a percentage and press Enter Thu phóng — nhập tỷ lệ phần trăm rồi nhấn EnterFit to width Vừa chiều rộngDisplay theme Chủ đề hiển thịSide panels Bảng bêndiff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsvindex 1f37b431d..1ddecc655 100644--- a/crates/ui-egui/src/i18n/zh-hans.tsv+++ b/crates/ui-egui/src/i18n/zh-hans.tsv@@ -1130,6 +1130,7 @@Next page 下一页Previous page 上一页Current page — type a page number or label (such as iv) and press Enter 当前页 — 输入页码或标签(如 iv)后按 Enter+ Zoom — type a percentage and press Enter 缩放 — 输入百分比并按 EnterOpen a PDF ({key}) 打开 PDF ({key})Dark gray theme 深灰色主题Light theme 浅色主题diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsvindex ded4ad904..bb5ec3649 100644--- a/crates/ui-egui/src/i18n/zh-hant.tsv+++ b/crates/ui-egui/src/i18n/zh-hant.tsv@@ -1074,6 +1074,7 @@Next page 下一頁Previous page 上一頁Current page — type a page number or label (such as iv) and press Enter 目前頁面:輸入頁碼或頁面標籤(例如 iv),再按 Enter+ Zoom — type a percentage and press Enter 縮放 — 輸入百分比並按 EnterOpen a PDF ({key}) 開啟 PDF({key})Dark gray theme 深灰色主題Light theme 淺色主題diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rsindex e173b93d4..725bcad4b 100644--- a/crates/ui-egui/src/lib.rs+++ b/crates/ui-egui/src/lib.rs@@ -2565,7 +2565,7 @@ impl PdfCraftApp {self.palette_query = value.to_string();}("page", Some(v)) => v.go_to_page(value.parse::<usize>().map_err(|e| e.to_string())?.saturating_sub(1)),- ("zoom", Some(v)) => v.set_zoom(value.trim_end_matches('%').parse::<f32>().map_err(|e| e.to_string())? / 100.0),+ ("zoom", Some(v)) => v.set_zoom(DocView::parse_zoom_percent(value).ok_or("zoom must be a percentage above 0")?),("layout", Some(v)) => {let (layout, continuous) = canvas::parse_display_token(value).ok_or("layout must be single, continuous, two-up or two-page")?;v.set_display(layout, continuous);diff --git a/crates/ui-egui/tests/view.rs b/crates/ui-egui/tests/view.rsindex 5ea5452fa..c30f081e4 100644--- a/crates/ui-egui/tests/view.rs+++ b/crates/ui-egui/tests/view.rs@@ -617,6 +617,35 @@ fn default_zoom_is_used_for_new_documents() {assert_eq!(fit_zoom(&fresh, 0), (Fit::None, 1.5));}+#[test]+fn the_rail_zoom_field_sets_a_typed_zoom() {+ use egui::accesskit::Role;+ use egui_kittest::kittest::Queryable;+ use pdfcraft_ui_egui::canvas::Fit;+ let mut h = harness(&[]);+ let type_zoom = |h: &mut Harness<'static, PdfCraftApp>, typed: &str, key: Key| {+ h.get_by_role_and_label(Role::TextInput, "Zoom").click();+ h.run_steps(2);+ h.get_by_role_and_label(Role::TextInput, "Zoom").type_text(typed);+ h.run_steps(1);+ h.key_press(key);+ h.run_steps(3);+ };+ type_zoom(&mut h, "150", Key::Enter);+ assert_eq!((h.state().views[0].fit, h.state().views[0].zoom), (Fit::None, 1.5));+ type_zoom(&mut h, "62.5 %", Key::Enter);+ assert_eq!(h.state().views[0].zoom, 0.625);+ for (typed, key) in [("abc", Key::Enter), ("0", Key::Enter), ("300", Key::Escape)] {+ type_zoom(&mut h, typed, key);+ assert_eq!(h.state().views[0].zoom, 0.625, "{typed}");+ }+ type_zoom(&mut h, "9000", Key::Enter);+ assert_eq!(h.state().views[0].zoom, 64.0);+ h.state_mut().views[0].set_zoom(2.0);+ h.run_steps(2);+ assert_eq!(h.get_by_role_and_label(Role::TextInput, "Zoom").value().as_deref(), Some("200%"));+}+#[test]fn preferences_set_the_default_zoom() {use egui_kittest::kittest::Queryable;diff --git a/parity/acrobat-features.toml b/parity/acrobat-features.tomlindex 47ea3f4e1..3a2569882 100644--- a/parity/acrobat-features.toml+++ b/parity/acrobat-features.toml@@ -950,8 +950,8 @@ milestone = "M3"status = "shipped"commands = []tools = []-evidence = ["crates/ui-egui/tests/ui.rs::selection_works_in_every_view_rotation"]-notes = "PdfCraft draws a percentage on its fixed 96-dpi basis: 96/72 logical pixels per PDF point at 100%. Acrobat draws it at its Page Display resolution, with logical pixels per PDF point = ppi / 72 × zoom (checked black-box with Custom resolutions of 96, 110 and 120 ppi on one display), so the same percentage can differ in size. Acrobat's Use System Setting resolution is not reproduced. Tracked with misc.prefs-page-display"+evidence = ["crates/ui-egui/tests/ui.rs::selection_works_in_every_view_rotation", "crates/ui-egui/tests/view.rs::the_rail_zoom_field_sets_a_typed_zoom"]+notes = "Typed into the right rail's zoom field (150, 150% or 62.5 %, Enter applies, Escape discards, clamped to 8–6400%) or set through the control channel's zoom option; no preset dropdown in the field yet. PdfCraft draws a percentage on its fixed 96-dpi basis: 96/72 logical pixels per PDF point at 100%. Acrobat draws it at its Page Display resolution, with logical pixels per PDF point = ppi / 72 × zoom (checked black-box with Custom resolutions of 96, 110 and 120 ppi on one display), so the same percentage can differ in size. Acrobat's Use System Setting resolution is not reproduced. Tracked with misc.prefs-page-display"[[feature]]id = "view.zoom-actual-size"