๐Ÿท๏ธ Page Labels

Custom page numbering: Roman numerals for front matter, decimal for body, prefixed for appendices.

C# โ€” Page Labels
// Front matter: lowercase Roman (i, ii, iii)
doc.AddPageLabels(0,
    PdfPageLabelStyle.LowercaseRoman);

// Body: decimal starting at 1 (1, 2, 3...)
doc.AddPageLabels(2,
    PdfPageLabelStyle.Decimal);

// Appendix: prefixed (A-1, A-2...)
doc.AddPageLabels(4,
    PdfPageLabelStyle.Decimal, "A-", 1);
Screenshot of the Page Labels PDF in a viewer showing the page navigation panel with Roman numeral labels (i, ii) for the first two pages, decimal labels (1, 2) for body pages, and prefixed labels (A-1) for the appendix page

You should see five pages. Check the page-number indicator in your PDF viewer's toolbar โ€” it should read i, ii, 1, 2, and A-1 as you flip through. Each page displays its label name as a heading (e.g. "Cover (page i)") and a reminder to check the viewer's navigation panel.
File: 10_page_labels.pdf

Available Styles

StyleOutputCommon Use
Decimal1, 2, 3, 4โ€ฆBody pages
LowercaseRomani, ii, iii, ivโ€ฆFront matter
UppercaseRomanI, II, III, IVโ€ฆFront matter
LowercaseLettersa, b, c, dโ€ฆSub-sections
UppercaseLettersA, B, C, Dโ€ฆAppendices