com.lowagie.text.pdf

Class PdfPage

public class PdfPage extends PdfDictionary

PdfPage is the PDF Page-object.

A Page object is a dictionary whose keys describe a single page containing text, graphics, and images. A Page onjects is a leaf of the Pages tree.
This object is described in the 'Portable Document Format Reference Manual version 1.3' section 6.4 (page 73-81)

See Also: PdfPages

Field Summary
static PdfName[]boxNames
static String[]boxStrings
static PdfNumberINVERTEDPORTRAIT
value of the Rotate key for a page in INVERTEDPORTRAIT
static PdfNumberLANDSCAPE
value of the Rotate key for a page in LANDSCAPE
PdfRectanglemediaBox
value of the MediaBox key
static PdfNumberPORTRAIT
value of the Rotate key for a page in PORTRAIT
static PdfNumberSEASCAPE
value of the Rotate key for a page in SEASCAPE
Constructor Summary
PdfPage(PdfRectangle mediaBox, HashMap boxSize, PdfDictionary resources, int rotate)
Constructs a PdfPage.
PdfPage(PdfRectangle mediaBox, HashMap boxSize, PdfDictionary resources)
Constructs a PdfPage.
Method Summary
voidadd(PdfIndirectReference contents)
Adds an indirect reference pointing to a PdfContents-object.
PdfRectanglegetMediaBox()
Returns the MediaBox of this Page.
booleanisParent()
Checks if this page element is a tree of pages.
PdfRectanglerotateMediaBox()
Rotates the mediabox, but not the text in it.

Field Detail

boxNames

private static final PdfName[] boxNames

boxStrings

private static final String[] boxStrings

INVERTEDPORTRAIT

public static final PdfNumber INVERTEDPORTRAIT
value of the Rotate key for a page in INVERTEDPORTRAIT

LANDSCAPE

public static final PdfNumber LANDSCAPE
value of the Rotate key for a page in LANDSCAPE

mediaBox

PdfRectangle mediaBox
value of the MediaBox key

PORTRAIT

public static final PdfNumber PORTRAIT
value of the Rotate key for a page in PORTRAIT

SEASCAPE

public static final PdfNumber SEASCAPE
value of the Rotate key for a page in SEASCAPE

Constructor Detail

PdfPage

PdfPage(PdfRectangle mediaBox, HashMap boxSize, PdfDictionary resources, int rotate)
Constructs a PdfPage.

Parameters: mediaBox a value for the MediaBox key resources an indirect reference to a PdfResources-object rotate a value for the Rotate key

PdfPage

PdfPage(PdfRectangle mediaBox, HashMap boxSize, PdfDictionary resources)
Constructs a PdfPage.

Parameters: mediaBox a value for the MediaBox key resources an indirect reference to a PdfResources-object

Method Detail

add

void add(PdfIndirectReference contents)
Adds an indirect reference pointing to a PdfContents-object.

Parameters: contents an indirect reference to a PdfContents-object

getMediaBox

PdfRectangle getMediaBox()
Returns the MediaBox of this Page.

Returns: a PdfRectangle

isParent

public boolean isParent()
Checks if this page element is a tree of pages.

This method allways returns false.

Returns: false because this is a single page

rotateMediaBox

PdfRectangle rotateMediaBox()
Rotates the mediabox, but not the text in it.

Returns: a PdfRectangle