Cargo Features

[dependencies]
printpdf = { version = "0.8.2", default-features = false, features = ["text_layout", "html", "js-sys", "gif", "jpeg", "png", "pnm", "tiff", "bmp", "ico", "tga", "hdr", "dds", "webp", "rayon"] }
default = html

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

text_layout html = azul-core, azul-css, azul-layout
html default = kuchiki, rust-fontconfig, text_layout, xmlparser

Affects image::translate_to_internal_rawimage, printpdf::html, printpdf::components, structs::html_to_document, structs::html_to_document_async

js-sys = wasm-bindgen-futures, web-sys

wasm + browser context

Enables js-sys

Affects api::Pdf_HtmlToDocument, api::Pdf_BytesToDocument, api::Pdf_DocumentToBytes, api::Pdf_ResourcesForPage, api::Pdf_PageToSvg

gif

Enables gif of image

jpeg

Enables jpeg of image

png

Enables png of image

pnm

Enables pnm of image

tiff

Enables tiff of image

bmp

Enables bmp of image

ico

Enables ico of image

tga

Enables tga of image

hdr

Enables hdr of image

dds

Enables dds of image

webp

Enables webp of image

rayon

enables multithreading for decoding images

Enables rayon of image

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.

rust-fontconfig html

Enables rust-fontconfig

feature=html, independent of feature=wasm

xmlparser html
web-sys js-sys?
wasm-bindgen-futures js-sys?
kuchiki html
azul-css text_layout?
azul-core text_layout?
azul-layout text_layout?