fn standard_size_from_mm_dimensions(
        width: u32,
        height: u32,
    ) -> Option<PdfPagePaperStandardSize> {
        match (width, height) {
            (216, 279) => Some(PdfPagePaperStandardSize::USLetterAnsiA),
            (140, 216) => Some(PdfPagePaperStandardSize::USHalfLetter),
            (203, 254) => Some(PdfPagePaperStandardSize::USGovernmentLetter),
            (216, 356) => Some(PdfPagePaperStandardSize::USLegal),
            (127, 203) => Some(PdfPagePaperStandardSize::USJuniorLegal),
            (216, 330) => Some(PdfPagePaperStandardSize::USGovernmentLegal),
            (279, 432) => Some(PdfPagePaperStandardSize::USLedgerTabloidAnsiB),
            (1682, 2378) => Some(PdfPagePaperStandardSize::A0x4),
            (1189, 1682) => Some(PdfPagePaperStandardSize::A0x2),
            (841, 1189) => Some(PdfPagePaperStandardSize::A0),
            (594, 841) => Some(PdfPagePaperStandardSize::A1),
            (420, 594) => Some(PdfPagePaperStandardSize::A2),
            (297, 420) => Some(PdfPagePaperStandardSize::A3),
            (210, 297) => Some(PdfPagePaperStandardSize::A4),
            (297, 210) => Some(PdfPagePaperStandardSize::A4R),
            (148, 210) => Some(PdfPagePaperStandardSize::A5),
            (105, 148) => Some(PdfPagePaperStandardSize::A6),
            (74, 105) => Some(PdfPagePaperStandardSize::A7),
            (52, 74) => Some(PdfPagePaperStandardSize::A8),
            (37, 52) => Some(PdfPagePaperStandardSize::A9),
            (26, 37) => Some(PdfPagePaperStandardSize::A10),
            (1000, 1414) => Some(PdfPagePaperStandardSize::B0),
            (707, 1000) => Some(PdfPagePaperStandardSize::B1),
            (500, 707) => Some(PdfPagePaperStandardSize::B2),
            (353, 500) => Some(PdfPagePaperStandardSize::B3),
            (250, 353) => Some(PdfPagePaperStandardSize::B4),
            (176, 250) => Some(PdfPagePaperStandardSize::B5),
            (125, 176) => Some(PdfPagePaperStandardSize::B6),
            (88, 125) => Some(PdfPagePaperStandardSize::B7),
            (62, 88) => Some(PdfPagePaperStandardSize::B8),
            (44, 62) => Some(PdfPagePaperStandardSize::B9),
            (31, 44) => Some(PdfPagePaperStandardSize::B10),
            (917, 1297) => Some(PdfPagePaperStandardSize::C0),
            (648, 917) => Some(PdfPagePaperStandardSize::C1),
            (458, 648) => Some(PdfPagePaperStandardSize::C2),
            (324, 458) => Some(PdfPagePaperStandardSize::C3),
            (229, 324) => Some(PdfPagePaperStandardSize::C4),
            (162, 229) => Some(PdfPagePaperStandardSize::C5),
            (114, 162) => Some(PdfPagePaperStandardSize::C6),
            (81, 114) => Some(PdfPagePaperStandardSize::C7),
            (57, 81) => Some(PdfPagePaperStandardSize::C8),
            (40, 57) => Some(PdfPagePaperStandardSize::C9),
            (28, 40) => Some(PdfPagePaperStandardSize::C10),
            (330, 483) => Some(PdfPagePaperStandardSize::AnsiBPlus),
            (432, 559) => Some(PdfPagePaperStandardSize::AnsiC),
            (559, 864) => Some(PdfPagePaperStandardSize::AnsiD),
            (864, 1118) => Some(PdfPagePaperStandardSize::AnsiE),
            (229, 305) => Some(PdfPagePaperStandardSize::ArchA),
            (305, 457) => Some(PdfPagePaperStandardSize::ArchB),
            (457, 610) => Some(PdfPagePaperStandardSize::ArchC),
            (610, 914) => Some(PdfPagePaperStandardSize::ArchD),
            (762, 1067) => Some(PdfPagePaperStandardSize::ArchE),
            _ => None,
        }
    }
/// Returns the [PdfPagePaperStandardSize] variant, if any, that exactly matches the
/// given dimensions in millimeters.
Returns the [PdfPagePaperStandardSize] variant, if any, that exactly matches the
given dimensions in millimeters.
Returns the [ PdfPagePaperStandardSize ] variant if any that exactly matches the given dimensions in millimeters .
fn standard_size_from_mm_dimensions(
        width: u32,
        height: u32,
    ) -> Option<PdfPagePaperStandardSize> {
        match (width, height) {
            (216, 279) => Some(PdfPagePaperStandardSize::USLetterAnsiA),
            (140, 216) => Some(PdfPagePaperStandardSize::USHalfLetter),
            (203, 254) => Some(PdfPagePaperStandardSize::USGovernmentLetter),
            (216, 356) => Some(PdfPagePaperStandardSize::USLegal),
            (127, 203) => Some(PdfPagePaperStandardSize::USJuniorLegal),
            (216, 330) => Some(PdfPagePaperStandardSize::USGovernmentLegal),
            (279, 432) => Some(PdfPagePaperStandardSize::USLedgerTabloidAnsiB),
            (1682, 2378) => Some(PdfPagePaperStandardSize::A0x4),
            (1189, 1682) => Some(PdfPagePaperStandardSize::A0x2),
            (841, 1189) => Some(PdfPagePaperStandardSize::A0),
            (594, 841) => Some(PdfPagePaperStandardSize::A1),
            (420, 594) => Some(PdfPagePaperStandardSize::A2),
            (297, 420) => Some(PdfPagePaperStandardSize::A3),
            (210, 297) => Some(PdfPagePaperStandardSize::A4),
            (297, 210) => Some(PdfPagePaperStandardSize::A4R),
            (148, 210) => Some(PdfPagePaperStandardSize::A5),
            (105, 148) => Some(PdfPagePaperStandardSize::A6),
            (74, 105) => Some(PdfPagePaperStandardSize::A7),
            (52, 74) => Some(PdfPagePaperStandardSize::A8),
            (37, 52) => Some(PdfPagePaperStandardSize::A9),
            (26, 37) => Some(PdfPagePaperStandardSize::A10),
            (1000, 1414) => Some(PdfPagePaperStandardSize::B0),
            (707, 1000) => Some(PdfPagePaperStandardSize::B1),
            (500, 707) => Some(PdfPagePaperStandardSize::B2),
            (353, 500) => Some(PdfPagePaperStandardSize::B3),
            (250, 353) => Some(PdfPagePaperStandardSize::B4),
            (176, 250) => Some(PdfPagePaperStandardSize::B5),
            (125, 176) => Some(PdfPagePaperStandardSize::B6),
            (88, 125) => Some(PdfPagePaperStandardSize::B7),
            (62, 88) => Some(PdfPagePaperStandardSize::B8),
            (44, 62) => Some(PdfPagePaperStandardSize::B9),
            (31, 44) => Some(PdfPagePaperStandardSize::B10),
            (917, 1297) => Some(PdfPagePaperStandardSize::C0),
            (648, 917) => Some(PdfPagePaperStandardSize::C1),
            (458, 648) => Some(PdfPagePaperStandardSize::C2),
            (324, 458) => Some(PdfPagePaperStandardSize::C3),
            (229, 324) => Some(PdfPagePaperStandardSize::C4),
            (162, 229) => Some(PdfPagePaperStandardSize::C5),
            (114, 162) => Some(PdfPagePaperStandardSize::C6),
            (81, 114) => Some(PdfPagePaperStandardSize::C7),
            (57, 81) => Some(PdfPagePaperStandardSize::C8),
            (40, 57) => Some(PdfPagePaperStandardSize::C9),
            (28, 40) => Some(PdfPagePaperStandardSize::C10),
            (330, 483) => Some(PdfPagePaperStandardSize::AnsiBPlus),
            (432, 559) => Some(PdfPagePaperStandardSize::AnsiC),
            (559, 864) => Some(PdfPagePaperStandardSize::AnsiD),
            (864, 1118) => Some(PdfPagePaperStandardSize::AnsiE),
            (229, 305) => Some(PdfPagePaperStandardSize::ArchA),
            (305, 457) => Some(PdfPagePaperStandardSize::ArchB),
            (457, 610) => Some(PdfPagePaperStandardSize::ArchC),
            (610, 914) => Some(PdfPagePaperStandardSize::ArchD),
            (762, 1067) => Some(PdfPagePaperStandardSize::ArchE),
            _ => None,
        }
    }
fn standard_size_from_mm_dimensions ( width : u32 , height : u32 , ) -> Option < PdfPagePaperStandardSize > { match ( width , height ) { ( 216 , 279 ) => Some ( PdfPagePaperStandardSize :: USLetterAnsiA ) , ( 140 , 216 ) => Some ( PdfPagePaperStandardSize :: USHalfLetter ) , ( 203 , 254 ) => Some ( PdfPagePaperStandardSize :: USGovernmentLetter ) , ( 216 , 356 ) => Some ( PdfPagePaperStandardSize :: USLegal ) , ( 127 , 203 ) => Some ( PdfPagePaperStandardSize :: USJuniorLegal ) , ( 216 , 330 ) => Some ( PdfPagePaperStandardSize :: USGovernmentLegal ) , ( 279 , 432 ) => Some ( PdfPagePaperStandardSize :: USLedgerTabloidAnsiB ) , ( 1682 , 2378 ) => Some ( PdfPagePaperStandardSize :: A0x4 ) , ( 1189 , 1682 ) => Some ( PdfPagePaperStandardSize :: A0x2 ) , ( 841 , 1189 ) => Some ( PdfPagePaperStandardSize :: A0 ) , ( 594 , 841 ) => Some ( PdfPagePaperStandardSize :: A1 ) , ( 420 , 594 ) => Some ( PdfPagePaperStandardSize :: A2 ) , ( 297 , 420 ) => Some ( PdfPagePaperStandardSize :: A3 ) , ( 210 , 297 ) => Some ( PdfPagePaperStandardSize :: A4 ) , ( 297 , 210 ) => Some ( PdfPagePaperStandardSize :: A4R ) , ( 148 , 210 ) => Some ( PdfPagePaperStandardSize :: A5 ) , ( 105 , 148 ) => Some ( PdfPagePaperStandardSize :: A6 ) , ( 74 , 105 ) => Some ( PdfPagePaperStandardSize :: A7 ) , ( 52 , 74 ) => Some ( PdfPagePaperStandardSize :: A8 ) , ( 37 , 52 ) => Some ( PdfPagePaperStandardSize :: A9 ) , ( 26 , 37 ) => Some ( PdfPagePaperStandardSize :: A10 ) , ( 1000 , 1414 ) => Some ( PdfPagePaperStandardSize :: B0 ) , ( 707 , 1000 ) => Some ( PdfPagePaperStandardSize :: B1 ) , ( 500 , 707 ) => Some ( PdfPagePaperStandardSize :: B2 ) , ( 353 , 500 ) => Some ( PdfPagePaperStandardSize :: B3 ) , ( 250 , 353 ) => Some ( PdfPagePaperStandardSize :: B4 ) , ( 176 , 250 ) => Some ( PdfPagePaperStandardSize :: B5 ) , ( 125 , 176 ) => Some ( PdfPagePaperStandardSize :: B6 ) , ( 88 , 125 ) => Some ( PdfPagePaperStandardSize :: B7 ) , ( 62 , 88 ) => Some ( PdfPagePaperStandardSize :: B8 ) , ( 44 , 62 ) => Some ( PdfPagePaperStandardSize :: B9 ) , ( 31 , 44 ) => Some ( PdfPagePaperStandardSize :: B10 ) , ( 917 , 1297 ) => Some ( PdfPagePaperStandardSize :: C0 ) , ( 648 , 917 ) => Some ( PdfPagePaperStandardSize :: C1 ) , ( 458 , 648 ) => Some ( PdfPagePaperStandardSize :: C2 ) , ( 324 , 458 ) => Some ( PdfPagePaperStandardSize :: C3 ) , ( 229 , 324 ) => Some ( PdfPagePaperStandardSize :: C4 ) , ( 162 , 229 ) => Some ( PdfPagePaperStandardSize :: C5 ) , ( 114 , 162 ) => Some ( PdfPagePaperStandardSize :: C6 ) , ( 81 , 114 ) => Some ( PdfPagePaperStandardSize :: C7 ) , ( 57 , 81 ) => Some ( PdfPagePaperStandardSize :: C8 ) , ( 40 , 57 ) => Some ( PdfPagePaperStandardSize :: C9 ) , ( 28 , 40 ) => Some ( PdfPagePaperStandardSize :: C10 ) , ( 330 , 483 ) => Some ( PdfPagePaperStandardSize :: AnsiBPlus ) , ( 432 , 559 ) => Some ( PdfPagePaperStandardSize :: AnsiC ) , ( 559 , 864 ) => Some ( PdfPagePaperStandardSize :: AnsiD ) , ( 864 , 1118 ) => Some ( PdfPagePaperStandardSize :: AnsiE ) , ( 229 , 305 ) => Some ( PdfPagePaperStandardSize :: ArchA ) , ( 305 , 457 ) => Some ( PdfPagePaperStandardSize :: ArchB ) , ( 457 , 610 ) => Some ( PdfPagePaperStandardSize :: ArchC ) , ( 610 , 914 ) => Some ( PdfPagePaperStandardSize :: ArchD ) , ( 762 , 1067 ) => Some ( PdfPagePaperStandardSize :: ArchE ) , _ => None , } }
Returns the [PdfPagePaperStandardSize] variant, if any, that exactly matches the
given dimensions in millimeters.
Returns the [ PdfPagePaperStandardSize ] variant if any that exactly matches the given dimensions in millimeters .
width
u32
height
u32
width
u32
height
u32