paper-sizes

Crates.iopaper-sizes
lib.rspaper-sizes
version0.4.0
created_at2025-10-05 22:17:37.650338+00
updated_at2025-11-30 18:28:28.554598+00
descriptionDetects paper sizes and defaults
homepage
repository
max_upload_size
id1869505
size54,975
Ben Pfaff (blp)

documentation

README

paper-sizes

paper-sizes is a library to detect the user's preferred paper size as well as system-wide and per-user known sizes.

This is a Rust equivalent of the library features in libpaper.

This crate does not provide the paper or paperconf programs. Use libpaper for those.

Use

To obtain the default paper size, create a Catalog, then obtain the default paper size:

use paper_sizes::Catalog;

let catalog = Catalog::new();
let default_size = catalog.default_paper().size;

See the documentation for more details.

License

This crate is distributed under your choice of the following licenses:

The paperspecs file in this crate is from libpaper, which documents it to be in the public domain.

Commit count: 0

cargo fmt