wkhtmltopdf 0.4.0

High-level bindings to wkhtmltopdf
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use wkhtmltopdf::*;

fn main() {
    env_logger::init();
    let image_app = ImageApplication::new().expect("Failed to init image application");

    let mut out = image_app
        .builder()
        .format(ImageFormat::Png)
        .build_from_url(&"https://www.rust-lang.org/en-US/".parse().unwrap())
        .expect("failed to build image");
    out.save("image.png").expect("failed to save image.png");
}