mirror of
https://github.com/storytold/designcraft.git
synced 2026-11-12 05:12:39 +00:00
With compressImages on, PDF export re-encodes rasters as JPEG in recompress, which decoded with the image crate directly. A gray PNG that decode_rgba refuses still decoded there, was copied and encoded as JPEG, and only then dropped: krilla refuses a JPEG wider or taller than 16,384 px, and every raster past the budget is. Exporting the 23,000 px PNG that way took 4.2 s and 1 GB more memory, for a PDF without the image. recompress now asks too_large_to_decode first, the check decode_rgba uses, so the export skips the image with the same warning at once.
36 lines
1.2 KiB
TOML
36 lines
1.2 KiB
TOML
[package]
|
|
name = "designcraft-pdf"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
description = "DesignCraft PDF export (krilla): real text with embedded font subsets, CMYK/spot colour, bleed and printer's marks"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
designcraft-geom = { workspace = true }
|
|
designcraft-color = { workspace = true }
|
|
designcraft-doc = { workspace = true }
|
|
designcraft-fonts = { workspace = true }
|
|
designcraft-compose = { workspace = true }
|
|
craft-pdf = { workspace = true, features = ["write-pdf"] }
|
|
craft-prepress = { workspace = true }
|
|
craft-cms = { workspace = true }
|
|
krilla-svg = { workspace = true }
|
|
designcraft-images = { workspace = true }
|
|
image = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
log = { workspace = true }
|
|
chrono = { workspace = true }
|
|
# The placed-PDF version check names hayro's PdfVersion (krilla::pdf::Pdf::version returns it).
|
|
hayro-syntax = "0.7.2"
|
|
|
|
[dev-dependencies]
|
|
hayro-interpret = { version = "0.7.0", default-features = false, features = ["embed-fonts"] }
|
|
hayro-cmap = "0.1"
|
|
kurbo = { workspace = true }
|
|
tiff = { workspace = true }
|
|
flate2 = "1"
|
|
designcraft-fonts = { workspace = true, features = ["testing"] }
|