Crate pdf_converter

Crate pdf_converter 

Source
Expand description

§PDF Converter

A simple library for converting JPG and other image formats to PDF documents.

§Features

  • Convert single images to PDF
  • Batch convert multiple images from a folder to a single PDF
  • Support for JPG, PNG, GIF, BMP, WebP formats
  • Automatic A4 page fitting with proper scaling
  • Configurable margins and page settings

§Example

use pdf_converter::PdfConverter;
 
let converter = PdfConverter::new();
converter.convert_folder_to_pdf("images/", "output.pdf")?;

Re-exports§

pub use converter::PdfConverter;
pub use converter::PdfConfig;
pub use error::PdfError;
pub use error::Result;

Modules§

converter
PDF converter implementation
error
Error types for PDF conversion operations

Constants§

A4_HEIGHT_MM
Default A4 page height in millimeters
A4_WIDTH_MM
Default A4 page width in millimeters
DEFAULT_DPI
Default DPI for image conversion
DEFAULT_MARGIN_MM
Default page margin in millimeters