Class PdfPageLabels
- Namespace
- iTextSharp.text.pdf
- Assembly
- iTextSharp.LGPLv2.Core.dll
Page labels are used to identify each page visually on the screen or in print. @author Paulo Soares (psoares@consiste.pt)
public class PdfPageLabels
- Inheritance
-
PdfPageLabels
- Inherited Members
Constructors
PdfPageLabels()
Creates a new PdfPageLabel with a default logical page 1
public PdfPageLabels()
Fields
DECIMAL_ARABIC_NUMERALS
Logical pages will have the form 1,2,3,...
public const int DECIMAL_ARABIC_NUMERALS = 0
Field Value
EMPTY
No logical page numbers are generated but fixed text may still exist
public const int EMPTY = 5
Field Value
LOWERCASE_LETTERS
Logical pages will have the form of uppercase letters (a to z for the first 26 pages, aa to zz for the next 26, and so on)
public const int LOWERCASE_LETTERS = 4
Field Value
LOWERCASE_ROMAN_NUMERALS
Logical pages will have the form i,ii,iii,iv,...
public const int LOWERCASE_ROMAN_NUMERALS = 2
Field Value
UPPERCASE_LETTERS
Logical pages will have the form of uppercase letters (A to Z for the first 26 pages, AA to ZZ for the next 26, and so on)
public const int UPPERCASE_LETTERS = 3
Field Value
UPPERCASE_ROMAN_NUMERALS
Logical pages will have the form I,II,III,IV,...
public const int UPPERCASE_ROMAN_NUMERALS = 1
Field Value
Methods
AddPageLabel(int, int)
Adds or replaces a page label. There is no text prefix and the first logical page has the default of 1.
public void AddPageLabel(int page, int numberStyle)
Parameters
page
intthe real page to start the numbering. First page is 1
numberStyle
intthe numbering style such as LOWERCASE_ROMAN_NUMERALS
AddPageLabel(int, int, string)
Adds or replaces a page label. The first logical page has the default of 1.
public void AddPageLabel(int page, int numberStyle, string text)
Parameters
page
intthe real page to start the numbering. First page is 1
numberStyle
intthe numbering style such as LOWERCASE_ROMAN_NUMERALS
text
stringthe text to prefix the number. Can be null or empty
AddPageLabel(int, int, string, int)
Adds or replaces a page label.
public void AddPageLabel(int page, int numberStyle, string text, int firstPage)
Parameters
page
intthe real page to start the numbering. First page is 1
numberStyle
intthe numbering style such as LOWERCASE_ROMAN_NUMERALS
text
stringthe text to prefix the number. Can be null or empty
firstPage
intthe first logical page number
AddPageLabel(PdfPageLabelFormat)
Adds or replaces a page label.
public void AddPageLabel(PdfPageLabels.PdfPageLabelFormat format)
Parameters
format
PdfPageLabels.PdfPageLabelFormat
GetPageLabelFormats(PdfReader)
Retrieves the page labels from a PDF as an array of {@link PdfPageLabelFormat} objects. or null if no page labels are present
public static PdfPageLabels.PdfPageLabelFormat[] GetPageLabelFormats(PdfReader reader)
Parameters
reader
PdfReadera PdfReader object that has the page labels you want to retrieve
Returns
- PdfPageLabelFormat[]
a PdfPageLabelEntry array, containing an entry for each format change
GetPageLabels(PdfReader)
Retrieves the page labels from a PDF as an array of String objects.
public static string[] GetPageLabels(PdfReader reader)
Parameters
reader
PdfReadera PdfReader object that has the page labels you want to retrieve
Returns
- string[]
a String array or null if no page labels are present
RemovePageLabel(int)
Removes a page label. The first page lagel can not be removed, only changed.
public void RemovePageLabel(int page)
Parameters
page
intthe real page to remove