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§
- Jpeg
ToPdf - Creates a PDF from JPEG images.
Enums§
- Cause
- Things that might go wrong while creating a PDF from JPEGs.
Functions§
- create_
pdf_ from_ jpegs Deprecated - Creates a PDF file from the provided JPEG data.