org.apache.fop.pdf
Class PDFPage

java.lang.Object
  extended byorg.apache.fop.pdf.PDFObject
      extended byorg.apache.fop.pdf.PDFPage

public class PDFPage
extends PDFObject

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. Modified by Mark Lillywhite, mark-fop@inomial.com. The Parent object was being referred to by reference, but all that we ever used from the Parent was it's PDF object ID, and according to the memory profile this was causing OOM issues. So, we store only the object ID of the parent, rather than the parent itself.


Field Summary
protected  PDFAnnotList annotList
          the list of annotation objects for this page
protected  PDFStream contents
          the contents stream
protected  int pageheight
          the height of the page in points
protected  int pagewidth
          the width of the page in points
protected  java.lang.String parent
          the page's parent, a PDF reference object
protected  PDFResources resources
          the page's /Resource object
 
Fields inherited from class org.apache.fop.pdf.PDFObject
generation, number
 
Constructor Summary
PDFPage(int number, PDFResources resources, PDFStream contents, int pagewidth, int pageheight)
          create a /Page object
 
Method Summary
 void addShading(PDFShading shading)
           
 PDFAnnotList getAnnotList()
          get this page's annotation list
 void setAnnotList(PDFAnnotList annotList)
          set this page's annotation list
 void setParent(PDFPages parent)
          set this page's parent
 byte[] toPDF()
          represent this object as PDF
 
Methods inherited from class org.apache.fop.pdf.PDFObject
getNumber, output, referencePDF
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

protected java.lang.String parent
the page's parent, a PDF reference object


resources

protected PDFResources resources
the page's /Resource object


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


annotList

protected PDFAnnotList annotList
the list of annotation objects for this page

Constructor Detail

PDFPage

public PDFPage(int number,
               PDFResources resources,
               PDFStream contents,
               int pagewidth,
               int pageheight)
create a /Page object

Parameters:
number - the object's number
resources - the /Resources object
contents - the content stream
pagewidth - the page's width in points
pageheight - the page's height in points
Method Detail

setParent

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

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

setAnnotList

public void setAnnotList(PDFAnnotList annotList)
set this page's annotation list

Parameters:
annotList - a PDFAnnotList list of annotations

getAnnotList

public PDFAnnotList getAnnotList()
get this page's annotation list

Returns:
annotList a PDFAnnotList list of annotations

addShading

public void addShading(PDFShading shading)

toPDF

public byte[] toPDF()
represent this object as PDF

Returns:
the PDF string


Copyright ? 1999-2003 Apache Software Foundation. All Rights Reserved.