Class Pages
java.lang.Object
com.orsonpdf.PDFObject
com.orsonpdf.Pages
A
PDFObject that maintains the list of pages for the document.
When a PDFDocument is created, it will create an instance of
Pages and add it to the document catalog. You won't normally
interact directly with this class.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate FontMapperThe list of font objects used in the document.private intprivate PDFDocumentThe PDF document. -
Constructor Summary
ConstructorsConstructorDescriptionPages(int number, int generation, PDFDocument parent) Creates a newPagesobject. -
Method Summary
Modifier and TypeMethodDescription(package private) voidprivate DictionaryFinds or creates a font reference for the specified AWT font.Returns the PDF document that the pages belong to.Returns the PDF font with the specified name, ornullif there is no font with that name.getFonts()Returns a list of fonts used in these pages.byte[]Returns the bytes that go between the 'obj' and 'endobj' in the PDF output for this object.getPages()Returns a list of the pages in this object.Methods inherited from class PDFObject
getGeneration, getNumber, getReference, toPDFBytes
-
Field Details
-
parent
The PDF document. -
pages
-
fonts
-
fontMap
-
nextFont
private int nextFont -
fontMapper
-
-
Constructor Details
-
Pages
Pages(int number, int generation, PDFDocument parent) Creates a newPagesobject.- Parameters:
number- the PDF object number.generation- the PDF object generation number.parent- the PDF document (nullnot permitted).
-
-
Method Details
-
getDocument
Returns the PDF document that the pages belong to.- Returns:
- The PDF document (never
null).
-
getPages
-
getFonts
-
getFont
-
add
- Parameters:
page-
-
findOrCreateFontReference
-
createDictionary
-
getObjectBytes
public byte[] getObjectBytes()Description copied from class:PDFObjectReturns the bytes that go between the 'obj' and 'endobj' in the PDF output for this object.- Specified by:
getObjectBytesin classPDFObject- Returns:
- A byte array.
-