mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-14 19:27:04 -04:00
* Gates: fix two clippy failures on main - ocr_ui: "Also recognize pages that already have text" used egui's own checkbox, which clippy.toml disallows (#1184 landed beside #1173); use widgets::checkbox like every other box. - camera_edges: Rust 1.97's manual_range_contains; the rewrite keeps the old answer for a NaN angle (false) with an is_finite check. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_019ojKsSCHWk2AuyDTFMHCd7 * M10: print from the web build through the browser's print dialog (gap 4) The web build had no printer: spool::submit refuses on wasm, so Print could only download the print-ready PDF. Now its Print dialog offers "Browser's print dialog" (the default there), which reaches every printer the operating system knows. - web_print: PdfCraft draws the print-ready PDF's sheets itself (engine Exporter), one sheet a frame since wasm has no threads: 300 dpi up to 100 sheets, 200 up to 300, 150 up to 1,000, at most 64 MP a sheet and 1 GiB of PNGs a job. The PNGs become blob URLs and print from a hidden srcdoc iframe, one sheet per page, margin 0. - Chromium prints every page at the default @page size, so a sheet of the paper's size turned sideways is rotated 90 degrees CCW onto it (as drivers do); other sizes get named @page rules. - Copies, two-sided and colour are greyed out (the browser's dialog sets them). If print() is refused (e.g. a sandboxed frame), the print-ready PDF downloads instead, with the reason. - pdfcraft-print stays free of web APIs; six new strings in all 20 catalogs (ATTRIBUTION hashes refreshed); docs and parity updated, gap 4 closed. Verified in headless Chromium against a trunk build: three sheets at 300 dpi, the landscape sheet turned, no blank trailing page, and the download fallback. Firefox and Safari not yet tried. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_019ojKsSCHWk2AuyDTFMHCd7 --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Brandon Thomas <[email protected]>
75 lines
3.1 KiB
TOML
75 lines
3.1 KiB
TOML
[package]
|
|
name = "pdfcraft-ui-egui"
|
|
description = "The egui shell of PdfCraft"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version = "1.95"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
craft-ui = { workspace = true }
|
|
pdfcraft-fonts = { workspace = true }
|
|
pdfcraft-engine = { workspace = true }
|
|
pdfcraft-cos = { workspace = true }
|
|
pdfcraft-render = { workspace = true }
|
|
pdfcraft-model = { workspace = true }
|
|
pdfcraft-platform = { workspace = true }
|
|
egui = { workspace = true, features = ["bytemuck"] }
|
|
egui_extras = { workspace = true }
|
|
eframe = { workspace = true, features = ["default_fonts", "wgpu", "accesskit", "persistence", "links"] }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
log = { workspace = true }
|
|
# Hands rendered rasters to egui as its pixels, without copying; already in the tree through egui and wgpu.
|
|
bytemuck = { version = "1", features = ["extern_crate_alloc"] }
|
|
|
|
rfd = { workspace = true }
|
|
png = "0.18"
|
|
base64 = "0.22"
|
|
# Right-to-left file names in the chrome (egui shapes but does not reorder); already in the tree.
|
|
unicode-bidi = "0.3"
|
|
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
|
# Control-channel tokens.
|
|
getrandom = "0.4"
|
|
# Create ▸ Clipboard (images; already in the tree through egui-winit).
|
|
arboard = { version = "3.6", default-features = false, features = ["image-data"] }
|
|
# Waits for native file pickers off the UI thread (already in the tree through wgpu).
|
|
pollster = "1.0"
|
|
# Checks that an installed fallback font parses and has the glyphs; the same skrifa egui uses.
|
|
skrifa = "0.44"
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
# Where the pointer is while files are dragged over the window (winit doesn't say): safe AppKit
|
|
# calls only. All three are already in the tree through arboard and rfd.
|
|
objc2 = "0.6"
|
|
objc2-app-kit = { version = "0.3", default-features = false, features = ["std", "NSEvent", "NSScreen"] }
|
|
objc2-foundation = { version = "0.3", default-features = false, features = ["std", "NSArray", "NSGeometry"] }
|
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
# Auto interface language: the Windows display language, without starting a process.
|
|
sys-locale = "0.3"
|
|
# Region ▸ Measurement system for the default Units, read from the registry without starting reg.exe.
|
|
winsafe = { version = "0.0.29", default-features = false, features = ["advapi"] }
|
|
|
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
|
rfd = { workspace = true, features = ["file-handle-inner"] }
|
|
wasm-bindgen-futures = "0.4"
|
|
wasm-bindgen = "0.2"
|
|
js-sys = "0.3"
|
|
web-sys = { version = "0.3", features = ["Window", "Document", "Element", "HtmlElement", "HtmlAnchorElement", "Blob", "BlobPropertyBag", "Url", "HtmlIFrameElement", "HtmlImageElement", "HtmlCollection", "Node", "EventTarget"] }
|
|
|
|
[dev-dependencies]
|
|
pdfcraft-xfa = { workspace = true }
|
|
egui_kittest = { workspace = true, features = ["eframe", "wgpu"] }
|
|
image = { version = "0.25", default-features = false, features = ["png"] }
|
|
# Glyph-coverage test of the interface fonts; the same skrifa pdfcraft-fonts already uses.
|
|
skrifa = "0.44"
|
|
|
|
[build-dependencies]
|
|
serde_json = { workspace = true }
|
|
toml = "1"
|