Crate imposer

Crate imposer 

Source
Expand description

A library for creating n-up booklet impositions from PDF files

This library takes a PDF file and rearranges its pages into booklet order, placing multiple pages side-by-side on each output page. The output is designed to be printed and folded into a booklet.

By default, it creates 2-up booklets (2 pages per side), but can be configured for any n-up layout (3-up, 4-up, etc.).

§Example

use std::fs;
use imposer::{generate_booklet, PageSize, BookletConfig};

let input = fs::read("input.pdf").unwrap();
let output = generate_booklet(&input).unwrap();
fs::write("booklet.pdf", output).unwrap();

Modules§

imposition
Page ordering and booklet imposition algorithms

Structs§

BookletConfig
Configuration options for booklet generation

Enums§

BindingType
Binding type for booklet imposition
BookletError
Errors that can occur during booklet generation
PageSize
Standard paper sizes for booklet output
SaddleStitchPages
Valid pages per sheet for saddle stitch binding

Functions§

generate_booklet
Generate a booklet from a PDF byte array
generate_booklet_with_config
Generate a booklet with custom configuration

Type Aliases§

Result
Result type for booklet operations