mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-11-01 05:58:12 -06:00
JBIG2 images, and JBIG2 stencil masks, were reported as "can't be exported yet", so an image the Optimizer stores as JBIG2 would stop exporting. They are now decoded with hayro-jbig2 (already in the tree through hayro), with their /JBIG2Globals from a DecodeParms dictionary or array, as JBIG2Decode gives them: black as 0 (ISO 32000-2 §7.4.7). Unreadable globals, a JBIG2 page of another width, or fewer rows than the image skip the image; rows past its height are dropped, so the output is bounded by the checked size. docs/pdf-spec-parity.md §7.4 no longer says there is no JBIG2 encoding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BfMGHQNgdq5yf5tKZHGR3z
32 lines
1.1 KiB
TOML
32 lines
1.1 KiB
TOML
[package]
|
|
name = "pdfcraft-create"
|
|
description = "Create PDFs: blank documents, from images (PNG, JPEG) and from plain text"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
pdfcraft-cos = { workspace = true }
|
|
pdfcraft-model = { workspace = true }
|
|
pdfcraft-fonts = { workspace = true }
|
|
# For `image::bmp_with_pixel_offset`, shared with XFA pictures.
|
|
pdfcraft-xfa = { workspace = true }
|
|
# Already in the graph through hayro: decodes JBIG2 images for Export ▸ Images.
|
|
hayro-jbig2.workspace = true
|
|
png = "0.18"
|
|
tiff = "0.11"
|
|
image = { version = "0.25", default-features = false, features = ["bmp", "gif", "jpeg"] }
|
|
# Already in the graph through image; read directly for CMYK JPEG samples, which image converts to RGB.
|
|
zune-jpeg = "0.5"
|
|
thiserror = { workspace = true }
|
|
# Already in the graph through lopdf; used only to read plain-text files (decode_text).
|
|
encoding_rs = "0.8"
|
|
|
|
[dev-dependencies]
|
|
image = { version = "0.25", default-features = false, features = ["bmp", "gif", "jpeg"] }
|
|
hayro-syntax = { workspace = true }
|
|
pdfcraft-filters = { workspace = true }
|