Cargo Features

[dependencies]
printpdf = { version = "0.7.0", default-features = false, features = ["less-optimization", "logging", "embedded_images", "ico", "tga", "hdr", "jpeg_rayon", "dxt", "dds", "webp", "svg", "font_subsetting", "annotations", "js-sys"] }
default = js-sys

The js-sys feature is set by default whenever printpdf is added without default-features = false somewhere in the dependency tree.

less-optimization

do not compress PDF streams, useful for debugging

logging = log

enables logging

embedded_images dds? dxt? hdr? ico? jpeg_rayon? tga? webp? = image

enables image support with some basic formats

ico = embedded_images

enables extra image formats

Enables ico of image ^0.24.3

image reading (png / jpeg)

tga = embedded_images

Enables tga of image ^0.24.3

hdr = embedded_images

Enables hdr of image ^0.24.3

jpeg_rayon = embedded_images

Enables jpeg_rayon of image ^0.24.3

dxt = embedded_images

Enables dxt of image ^0.24.3

dds = embedded_images

Enables dds of image ^0.24.3

webp = embedded_images

Enables webp of image ^0.24.3

svg = pdf-writer, svg2pdf, usvg

enables svg

Affects printpdf::svg

font_subsetting

Enables allsorts ^0.14

annotations = pdf-writer

enables annotations

js-sys default

enables js-sys features on wasm

Enables js-sys

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

log logging?

Enables log

optional: logging

image dds? dxt? embedded_images? hdr? ico? jpeg_rayon? tga? webp?

Enables image ^0.24.3

svg2pdf svg?

Enables svg2pdf ^0.8

svg support (svg -> pdf xobject)

pdf-writer annotations? svg?

Enables pdf-writer ^0.9

usvg svg?

Enables usvg ^0.35.0