fop 0.94

org.apache.fop.pdf
Class PDFPage

java.lang.Object
  extended by org.apache.fop.pdf.PDFObject
      extended by org.apache.fop.pdf.PDFResourceContext
          extended by org.apache.fop.pdf.PDFPage
All Implemented Interfaces:
PDFWritable

public class PDFPage
extends PDFResourceContext

Class representing a /Page object.

There is one of these for every page in a PDF document. The object specifies the dimensions of the page and references a /Resources object, a contents stream and the page's parent in the page hierarchy.


Field Summary
protected  PDFStream contents
          the contents stream
protected  int duration
          Duration to display page
protected  int pageheight
          the height of the page in points
protected  int pageIndex
          the page index (zero-based)
protected  int pagewidth
          the width of the page in points
protected  TransitionDictionary trDictionary
          Transition dictionary
 
Fields inherited from class org.apache.fop.pdf.PDFResourceContext
annotList, resources
 
Fields inherited from class org.apache.fop.pdf.PDFObject
DATE_FORMAT, log
 
Constructor Summary
PDFPage(PDFResources resources, int pageWidth, int pageHeight, int pageIndex)
          Create a /Page object
PDFPage(PDFResources resources, PDFStream contents, int pageWidth, int pageHeight, int pageIndex)
          Create a /Page object
 
Method Summary
 int getHeight()
          Returns the page height.
 int getPageIndex()
           
 int getWidth()
          Returns the page width.
 void setContents(PDFStream contents)
          set this page contents
 void setParent(PDFPages parent)
          set this page's parent
 void setTransition(int dur, TransitionDictionary tr)
          Set the transition dictionary and duration.
 java.lang.String toPDFString()
          This method returns a String representation of the PDF object.
 
Methods inherited from class org.apache.fop.pdf.PDFResourceContext
addAnnotation, addGState, addShading, getAnnotations, getPDFResources
 
Methods inherited from class org.apache.fop.pdf.PDFObject
encode, encodeString, encodeText, formatDateTime, formatObject, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, hasObjectNumber, makeReference, output, referencePDF, setDocument, setObjectNumber, toInlinePDFString, toPDF
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

contents

protected PDFStream contents
the contents stream


pagewidth

protected int pagewidth
the width of the page in points


pageheight

protected int pageheight
the height of the page in points


pageIndex

protected int pageIndex
the page index (zero-based)


duration

protected int duration
Duration to display page


trDictionary

protected TransitionDictionary trDictionary
Transition dictionary

Constructor Detail

PDFPage

public PDFPage(PDFResources resources,
               PDFStream contents,
               int pageWidth,
               int pageHeight,
               int pageIndex)
Create a /Page object

Parameters:
resources - the /Resources object
contents - the content stream
pageWidth - the page's width in points
pageHeight - the page's height in points
pageIndex - the page's zero-based index (or -1 if the page number is auto-determined)

PDFPage

public PDFPage(PDFResources resources,
               int pageWidth,
               int pageHeight,
               int pageIndex)
Create a /Page object

Parameters:
resources - the /Resources object
pageWidth - the page's width in points
pageHeight - the page's height in points
pageIndex - the page's zero-based index (or -1 if the page number is auto-determined)
Method Detail

setContents

public void setContents(PDFStream contents)
set this page contents

Parameters:
contents - the contents of the page

setParent

public void setParent(PDFPages parent)
set this page's parent

Parameters:
parent - the /Pages object that is this page's parent

setTransition

public void setTransition(int dur,
                          TransitionDictionary tr)
Set the transition dictionary and duration. This sets the duration of the page and the transition dictionary used when going to the next page.

Parameters:
dur - the duration in seconds
tr - the transition dictionary

getWidth

public int getWidth()
Returns the page width.

Returns:
the page width

getHeight

public int getHeight()
Returns the page height.

Returns:
the page height

getPageIndex

public int getPageIndex()
Returns:
the page Index of this page (zero-based), -1 if it the page index should automatically be determined.

toPDFString

public java.lang.String toPDFString()
Description copied from class: PDFObject
This method returns a String representation of the PDF object. The result is normally converted/encoded to a byte array by toPDF(). Only use this method to implement the serialization if the object can be fully represented as text. If the PDF representation of the object contains binary content use toPDF() or output(OutputStream) instead.

Overrides:
toPDFString in class PDFObject
Returns:
String the String representation
See Also:
PDFObject.toPDFString()

fop 0.94

Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.