# html2pdf [![Docs](https://docs.rs/html2pdf/badge.svg)](https://docs.rs/html2pdf) [![Crates.io](https://img.shields.io/crates/v/html2pdf.svg?maxAge=2592000)](https://crates.io/crates/html2pdf) Just a CLI over the [`headless_chrome`](https://crates.io/crates/headless_chrome) crate to create PDF. ## Install Need the Rust toolchain: . ```shell cargo install html2pdf ``` ## Usage ```shell html2pdf path/to/file.html ``` To remove logs, set the env var `RUST_LOG` to `none` : ```shell RUST_LOG="none" html2pdf path/to/file.html ``` ## Options Just run `html2pdf --help` : ```shell html2pdf 0.4.0 Generate a PDF from a local HTML file using a headless chrome USAGE: html2pdf [FLAGS] [OPTIONS] FLAGS: --background Allow print background -h, --help Prints help information --landscape Use landscape mode --disable-sandbox Disable Chrome sandbox. Not recommended, unless running on docker -V, --version Prints version information OPTIONS: --footer