org.apache.fop.pdf
Class PDFPages

java.lang.Object
  |
  +--org.apache.fop.pdf.PDFObject
        |
        +--org.apache.fop.pdf.PDFPages

public class PDFPages
extends PDFObject

class representing a /Pages object. A /Pages object is an ordered collection of pages (/Page objects) (Actually, /Pages can contain further /Pages as well but this implementation doesn't allow this)


Field Summary
protected  int count
          the number of /Page objects
protected  java.util.Vector kids
          the /Page objects
 
Fields inherited from class org.apache.fop.pdf.PDFObject
generation, number
 
Constructor Summary
PDFPages(int number)
          create a /Pages object.
 
Method Summary
 void addPage(PDFPage page)
          add a /Page object.
 int getCount()
          get the count of /Page objects
 void incrementCount()
          increment the count of /Page objects
 byte[] toPDF()
          represent the object in 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

kids

protected java.util.Vector kids
the /Page objects

count

protected int count
the number of /Page objects
Constructor Detail

PDFPages

public PDFPages(int number)
create a /Pages object. NOTE: The PDFPages object must be created before the PDF document is generated, but it is not written to the stream immediately. It must aslo be allocated an object ID (so that the kids can refer to the parent) so that the XRef table needs to be updated before this object is written.
Parameters:
number - the object's number
Method Detail

addPage

public void addPage(PDFPage page)
add a /Page object.
Parameters:
page - the PDFPage to add.

getCount

public int getCount()
get the count of /Page objects
Returns:
the number of pages

incrementCount

public void incrementCount()
increment the count of /Page objects

toPDF

public byte[] toPDF()
represent the object in PDF
Returns:
the PDF string


Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.