Repository navigation
v0.2.2
CMYK
- Borders in CMYK:
CmykPdfOptions::with_borderdraws aBorderPlugin
(frame, inner/outer/dashed borders, curved or straight text, image
decorations) in DeviceCMYK. Text is converted to outlines, so no fonts
are embedded.with_fontssupplies fonts on servers without them, and
with_overlay_svgdraws any SVG on top.BorderPlugin::overlay_svg
returns the border as a standalone SVG. - Sheet layouts:
QRCodeStyling::write_cmyk_xobjectwrites a QR code as
a self-contained CMYK Form XObject into your ownpdf_writerdocument.
pdf_writeris re-exported with thecmykfeature. See
examples/cmyk_sheet.rs. - Custom conversion:
CmykPdfOptions::with_converterplugs in your own
RGB→CMYK conversion (e.g. an ICC/lcms transform) for colors not in the
color map, including gradient stops and logo pixels.
JS compatibility (opt-in)
QRCodeStylingBuilder::js_compatible(true)produces output identical to
JSqr-code-styling1.9.2: the same matrix asqrcode-generator
(single-mode encoding, its own mask penalty) and the same circle-shape dot
ring (rounded center, transposed sampling). Verified against 2,224
qrcode-generatormatrices and 96 pixel-identical JS renders. Characters
above U+00FF are encoded as UTF-8; JS would corrupt them. Also available as
QRMatrix::new_js_compatibleandSvgRenderer::js_compatible.
Fixes
- Straight border text (
round < 0.5) was centered on the canvas edge, so
half of it was cut off. It now sits on the border stroke. This changes
SVG output for such borders. CmykPdfOptions::default()now compresses streams likenew().
Dependencies
resvgis optional. It comes in only with the raster formats (png,
jpeg,webp, via the newrasterfeature).usvgis used bypdfand
cmyk. Default features are unchanged.- Upgrade note: with
default-features = false,RasterRenderernow
needs one of the raster features.
Full changelog: v0.2.1...v0.2.2