org.apache.fop.pdf
Class PDFRoot

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

public class PDFRoot
extends PDFObject

class representing a Root (/Catalog) object


Field Summary
protected  PDFPages rootPages
          the /Pages object that is root of the Pages hierarchy
 
Fields inherited from class org.apache.fop.pdf.PDFObject
generation, number
 
Constructor Summary
PDFRoot(int number, PDFPages pages)
          create a Root (/Catalog) object.
 
Method Summary
 void addPage(PDFPage page)
          add a /Page object to the root /Pages object
 Collection getDestinations()
           
 PDFOutline getRootOutline()
           
 void setRootOutline(PDFOutline outline)
           
 void setRootPages(PDFPages pages)
          set the root /Pages object
 byte[] toPDF()
          represent the 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

rootPages

protected PDFPages rootPages
the /Pages object that is root of the Pages hierarchy

Constructor Detail

PDFRoot

public PDFRoot(int number,
               PDFPages pages)
create a Root (/Catalog) object. NOTE: The PDFRoot object must be created before the PDF document is generated, but it is not assigned an object ID until it is about to be written (immediately before the xref table as part of the trsailer). (mark-fop@inomial.com)

Parameters:
number - the object's number
Method Detail

addPage

public void addPage(PDFPage page)
add a /Page object to the root /Pages object

Parameters:
page - the /Page object to add

setRootPages

public void setRootPages(PDFPages pages)
set the root /Pages object

Parameters:
pages - the /Pages object to set as root

setRootOutline

public void setRootOutline(PDFOutline outline)

getRootOutline

public PDFOutline getRootOutline()

getDestinations

public Collection getDestinations()

toPDF

public byte[] toPDF()
             throws IllegalStateException
represent the object as PDF.

Returns:
the PDF string
Throws:
IllegalStateException - if the setNumber() method has not been called.


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