| Crates.io | standard_paper_sizes |
| lib.rs | standard_paper_sizes |
| version | 1.1.0 |
| created_at | 2025-08-16 19:41:03.782062+00 |
| updated_at | 2025-08-16 21:12:35.559285+00 |
| description | Standard paper sizes for printing |
| homepage | |
| repository | https://github.com/elliotcubit/standard_paper_sizes |
| max_upload_size | |
| id | 1798797 |
| size | 58,474 |
The standard_paper_sizes crate provides an enum of different paper types across the world and their dimensions in millimeters.
This is particularly useful when generating documents (e.g. with printpdf) of exact sizes for printing.
This work is inspired by papersizes.io.
standard_paper_sizes features 136 unique sizes paired with 10 common names for sizes (e.g. UsLetter for AnsiA).
UsEnvelope1_75CR80TD1CreditCardVisaPassportMiniSIMPassportAdd to your project using cargo add:
$ cargo add standard_paper_sizes
Alternatively, you can add crate dependencies in your Cargo.toml directly:
[dependencies]
standard_paper_sizes = "1.0.0"
You can then use the Type enum and its method size:
use standard_paper_sizes::Type;
fn main() {
println("{}", Type::UsLetter.size())
}
// Output: "216.0x279.0"
GPLv3