I have some code that works correctly to produce page numbers from an original rtf file when output to a word doc. However when output to a pdf I can get either all roman lowercase, or all arabic numerals, but not roman lowercase for the table of contents, and arabic for the actual document. I have tried various incantations of this code but here is the basic flow.
Document doc = new Document(filename);
doc.LastSection.PageSetup.PageNumberStyle = NumberStyle.Arabic;
Section lastSection = null;
int counter = 1;
foreach (Section sec in doc.Sections) //three sections, header, TOC and body
sec.PageSetup.PageStartingNumber = 1;
sec.PageSetup.PageNumberStyle = counter == 2 ? NumberStyle.LowercaseRoman : NumberStyle.Arabic;
sec.PageSetup.RestartPageNumbering = true;
Again this works correctly when outputing to a word document, but not to a pdf.