M3: type an exact zoom into the rail's zoom field (#1755)

* M3: type an exact zoom into the rail's zoom field

The rail's zoom percentage was a read-only label. It is now a text field:
Enter applies a typed percentage (150, 150%, 62.5 %), Escape or unparsable
input keeps the current zoom. The control channel's zoom option uses the
same parser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* M3: document parse_zoom_percent

* i18n: Vietnamese for the zoom field's tooltip

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
This commit is contained in:
Benjamin Michel
2026-10-18 09:53:24 -04:00
committed by GitHub
co-authored by Claude Opus 5.5 Brandon Thomas
parent b68b3c1119
commit 6525140955
29 changed files with 124 additions and 29 deletions
+22 -22
View File
@@ -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]]
+1
View File
@@ -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.
+17
View File
@@ -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.
+30 -4
View File
@@ -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);
+1
View File
@@ -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
Can't render this file because it contains an unexpected character in line 6 and column 47.
+1
View File
@@ -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 Мащаб — въведете процент и натиснете Enter
Open a PDF ({key}) Отвори PDF файл ({key})
Dark gray theme Тъмносива тема
Light theme Светла тема
Can't render this file because it contains an unexpected character in line 8 and column 16.
+1
View File
@@ -279,6 +279,7 @@ key Space Mezerník
Next page Další stránka
Previous page Předchozí stránka
Current 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 Enter
Welcome to PdfCraft Vítá vás PdfCraft
An 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ě ArtCraft
Can't render this file because it contains an unexpected character in line 6 and column 47.
+1
View File
@@ -135,6 +135,7 @@
Next page Nächste Seite
Previous page Vorherige Seite
Current 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 Eingabetaste
Welcome to PdfCraft Willkommen bei PdfCraft
An 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 bei
Can't render this file because it contains an unexpected character in line 6 and column 51.
+1
View File
@@ -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 Ζουμ — πληκτρολογήστε ένα ποσοστό και πατήστε Enter
Files 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 Μετακίνηση πάνω
1 # Greek (el) interface catalog. Columns: context <TAB> English source <TAB> Greek translation.
282
283
284
285
286
287
288
+1
View File
@@ -158,6 +158,7 @@
Next page Página siguiente
Previous page Página anterior
Current 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 Intro
Welcome to PdfCraft Te damos la bienvenida a PdfCraft
An 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 ArtCraft
Can't render this file because it contains an unexpected character in line 6 and column 60.
+1
View File
@@ -135,6 +135,7 @@
Next page Page suivante
Previous page Page précédente
Current 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ée
Welcome to PdfCraft Bienvenue dans PdfCraft
An open-source PDF workbench — local, private, and scriptable. Un atelier PDF open source — local, privé et automatisable.
Join the ArtCraft community Rejoindre la communauté ArtCraft
Can't render this file because it contains an unexpected character in line 6 and column 39.
+1
View File
@@ -133,6 +133,7 @@
Next page Következő oldal
Previous page Előző oldal
Current 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 Entert
Welcome to PdfCraft Üdvözöljük a PdfCraftban
An 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éghez
Can't render this file because it contains an unexpected character in line 7 and column 44.
+1
View File
@@ -159,6 +159,7 @@
Next page Pagina successiva
Previous page Pagina precedente
Current 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 Invio
Welcome to PdfCraft Benvenuto in PdfCraft
An 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 ArtCraft
Can't render this file because it contains an unexpected character in line 6 and column 47.
+1
View File
@@ -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 コミュニティに参加
Can't render this file because it contains an unexpected character in line 6 and column 47.
+1
View File
@@ -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 қауымдастығына қосылыңыз
1 Menu Мәзір
123 Next page Келесі бет
124 Previous page Алдыңғы бет
125 Current page — type a page number or label (such as iv) and press Enter Ағымдағы бет — бет нөмірін немесе белгісін (мысалы, iv) теріңіз де, Enter пернесін басыңыз
126 Zoom — type a percentage and press Enter Масштаб — пайызды енгізіп, Enter пернесін басыңыз
127 Welcome to PdfCraft PdfCraft-ге қош келдіңіз
128 An open-source PDF workbench — local, private, and scriptable. Ашық бастапқы кодты PDF жұмыс орны — жергілікті, жеке әрі скрипттерді қолдайтын.
129 Join the ArtCraft community ArtCraft қауымдастығына қосылыңыз
+1
View File
@@ -431,6 +431,7 @@
Current page Dabartinis puslapis
Current 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 Enter
Custom Pasirinktinis
Custom scale: Pasirinktinis mastelis:
Custom text: Pasirinktinis tekstas:
Can't render this file because it contains an unexpected character in line 404 and column 9.
+1
View File
@@ -158,6 +158,7 @@
Next page Następna strona
Previous page Poprzednia strona
Current 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 Enter
Welcome to PdfCraft Witamy w PdfCraft
An 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 ArtCraft
Can't render this file because it contains an unexpected character in line 6 and column 47.
+1
View File
@@ -1067,6 +1067,7 @@
Next page Próxima página
Previous page Página anterior
Current 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 Enter
Open a PDF ({key}) Abrir um PDF ({key})
Dark gray theme Tema cinza escuro
Light theme Tema claro
Can't render this file because it contains an unexpected character in line 9 and column 16.
+1
View File
@@ -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 Масштаб — введите процент и нажмите Enter
Welcome to PdfCraft Добро пожаловать в PdfCraft
An open-source PDF workbench — local, private, and scriptable. Открытый PDF-редактор — локальный, приватный и программируемый.
Join the ArtCraft community Присоединяйтесь к сообществу ArtCraft
Can't render this file because it contains an unexpected character in line 9 and column 16.
+1
View File
@@ -519,6 +519,7 @@
Current page Trenutna stran
Current 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 Enter
Custom Po meri
Custom 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 datotek
Can't render this file because it contains an unexpected character in line 9 and column 16.
+1
View File
@@ -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 కమ్యూనిటీలో చేరండి
Can't render this file because it contains an unexpected character in line 13 and column 16.
+1
View File
@@ -120,6 +120,7 @@
Next page Sonraki sayfa
Previous page Önceki sayfa
Current 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ın
Welcome to PdfCraft PdfCraft'a Hoş Geldiniz
An 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ın
1 # Turkish (tr) catalog. Format: see the header of ja.tsv
120
121
122
123
124
125
126
+1
View File
@@ -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 Масштаб — введіть відсоток і натисніть Enter
Welcome to PdfCraft Вітаємо в PdfCraft
An open-source PDF workbench — local, private, and scriptable. Відкритий інструментарій для PDF — локальний, приватний і з підтримкою сценаріїв.
Join the ArtCraft community Приєднатися до спільноти ArtCraft
Can't render this file because it contains an unexpected character in line 6 and column 47.
+1
View File
@@ -15,6 +15,7 @@
Zoom Thu phóng
Actual size Kích thước thực
Zoom 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 Enter
Fit to width Vừa chiều rộng
Display theme Chủ đề hiển thị
Side panels Bảng bên
1 # Vietnamese (vi) catalog. Columns, separated by a TAB: context <TAB> source <TAB> translation
15
16
17
18
19
20
21
+1
View File
@@ -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 缩放 — 输入百分比并按 Enter
Open a PDF ({key}) 打开 PDF ({key})
Dark gray theme 深灰色主题
Light theme 浅色主题
Can't render this file because it contains an unexpected character in line 9 and column 16.
+1
View File
@@ -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 縮放 — 輸入百分比並按 Enter
Open a PDF ({key}) 開啟 PDF({key})
Dark gray theme 深灰色主題
Light theme 淺色主題
Can't render this file because it contains an unexpected character in line 9 and column 16.
+1 -1
View File
@@ -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);
+29
View File
@@ -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;
+2 -2
View File
@@ -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"