Crate jpeg_to_pdf[][src]

Expand description

Creates PDFs from JPEG images.

Images are embedded directly in the PDF, without any re-encoding.

Example

use std::fs::{self, File};
use std::io::BufWriter;

use jpeg_to_pdf::JpegToPdf;

let out_file = File::create("out.pdf").unwrap();

JpegToPdf::new()
    .add_image(fs::read("one.jpg").unwrap())
    .add_image(fs::read("two.jpg").unwrap())
    .add_image(fs::read("three.jpg").unwrap())
    .create_pdf(&mut BufWriter::new(out_file))
    .unwrap();

Structs

Creates a PDF from JPEG images.

Enums

Things that might go wrong while creating a PDF from JPEGs.

Functions

Creates a PDF file from the provided JPEG data.