com.lowagie.text.pdf
Class PdfPages

java.lang.Object
  |
  +--com.lowagie.text.pdf.PdfObject
        |
        +--com.lowagie.text.pdf.PdfDictionary
              |
              +--com.lowagie.text.pdf.PdfPages
All Implemented Interfaces:
PdfPageElement

public class PdfPages
extends PdfDictionary
implements PdfPageElement

PdfPages is the PDF Pages-object.

The Pages of a document are accessible through a tree of nodes known as the Pages tree. This tree defines the ordering of the pages in the document.
This object is described in the 'Portable Document Format Reference Manual version 1.3' section 6.3 (page 71-73)

See Also:
PdfPageElement, PdfPage

Field Summary
private  PdfNumber count
          value of the Count-key
private  PdfArray kids
          value of the Kids-key
private  ArrayList pages
          array of objects of the type PdfPageElement (contains the actual Pages tree)
 
Fields inherited from class com.lowagie.text.pdf.PdfDictionary
CATALOG, FONT, hashMap, OUTLINES, PAGE, PAGES
 
Fields inherited from class com.lowagie.text.pdf.PdfObject
ARRAY, BOOLEAN, bytes, DICTIONARY, INDIRECT, NAME, NOTHING, NULL, NUMBER, STREAM, STRING, TEXT_PDFDOCENCODING, TEXT_UNICODE, type
 
Constructor Summary
(package private) PdfPages()
          Constructs a PdfPages-object.
 
Method Summary
(package private)  void add(PdfIndirectReference kid)
          Updates the array of kids.
(package private)  void add(PdfPage page)
          Adds a PdfPage-object.
(package private)  void add(PdfPages pages)
          Adds a PdfPages-object.
 boolean isParent()
          Checks if this page element is a tree of pages.
(package private)  Iterator iterator()
          Returns an Iterator with all the leafs of this Pages-object.
(package private)  int reorderPages(int[] order)
           
 void setParent(PdfIndirectReference reference)
          Set the value for the Parent key in the Page or Pages Dictionary.
 
Methods inherited from class com.lowagie.text.pdf.PdfDictionary
get, getKeys, isCatalog, isDictionaryType, isFont, isOutlineTree, isPage, isPages, merge, mergeDifferent, put, putAll, putDel, putEx, remove, toPdf
 
Methods inherited from class com.lowagie.text.pdf.PdfObject
getBytes, isArray, isBoolean, isDictionary, isName, isNull, isNumber, isStream, isString, length, setContent, toString, type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

count

private PdfNumber count
value of the Count-key


kids

private PdfArray kids
value of the Kids-key


pages

private ArrayList pages
array of objects of the type PdfPageElement (contains the actual Pages tree)

Constructor Detail

PdfPages

PdfPages()
Constructs a PdfPages-object.

Method Detail

setParent

public void setParent(PdfIndirectReference reference)
Set the value for the Parent key in the Page or Pages Dictionary.

Specified by:
setParent in interface PdfPageElement
Parameters:
reference - an indirect reference to a PdfPages-object

isParent

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

This method allways returns true.

Specified by:
isParent in interface PdfPageElement
Returns:
true because this object is a tree of pages

add

void add(PdfPages pages)
Adds a PdfPages-object.

Parameters:
pages - a PdfPages-object

add

void add(PdfPage page)
Adds a PdfPage-object.

Parameters:
page - a PdfPage-object

add

void add(PdfIndirectReference kid)
Updates the array of kids.

Parameters:
kid - an indirect reference to a PdfPageElement-object

iterator

Iterator iterator()
Returns an Iterator with all the leafs of this Pages-object.

Returns:
an Iterator

reorderPages

int reorderPages(int[] order)
           throws DocumentException
DocumentException