java.lang.Object
org.jfree.pdf.internal.PDFObject
org.jfree.pdf.internal.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 final FontMapper
The list of font objects used in the document.private int
private final PDFDocument
The PDF document. -
Constructor Summary
ConstructorsConstructorDescriptionPages
(int number, int generation, PDFDocument parent) Creates a newPages
object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a page to the collection.private Dictionary
Finds 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, ornull
if 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 org.jfree.pdf.internal.PDFObject
getGeneration, getNumber, getReference, toPDFBytes
-
Field Details
-
parent
The PDF document. -
pages
-
fonts
The list of font objects used in the document. -
fontMap
-
nextFont
private int nextFont -
fontMapper
-
-
Constructor Details
-
Pages
Creates a newPages
object.- Parameters:
number
- the PDF object number.generation
- the PDF object generation number.parent
- the PDF document (null
not permitted).
-
-
Method Details
-
getDocument
Returns the PDF document that the pages belong to.- Returns:
- The PDF document (never
null
).
-
getPages
Returns a list of the pages in this object.- Returns:
- A list of the pages.
-
getFonts
Returns a list of fonts used in these pages.- Returns:
- A list of fonts.
-
getFont
Returns the PDF font with the specified name, ornull
if there is no font with that name.- Parameters:
name
- the font name.- Returns:
- The PDF font or
null
.
-
add
Adds a page to the collection.- Parameters:
page
- the page.
-
findOrCreateFontReference
Finds or creates a font reference for the specified AWT font.- Parameters:
f
- the font (null
not permitted).- Returns:
- The font reference.
-
createDictionary
-
getObjectBytes
public byte[] getObjectBytes()Description copied from class:PDFObject
Returns the bytes that go between the 'obj' and 'endobj' in the PDF output for this object.- Specified by:
getObjectBytes
in classPDFObject
- Returns:
- A byte array.
-