fop 0.94

org.apache.fop.pdf
Class PDFRoot

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

public class PDFRoot
extends PDFObject

class representing a Root (/Catalog) object


Field Summary
static int PAGEMODE_FULLSCREEN
          Full screen page mode
static int PAGEMODE_USENONE
          Use no page mode setting, default
static int PAGEMODE_USEOUTLINES
          Use outlines page mode to show bookmarks
static int PAGEMODE_USETHUMBS
          Use thumbs page mode to show thumbnail images
protected  PDFPages rootPages
          the /Pages object that is root of the Pages hierarchy
 
Fields inherited from class org.apache.fop.pdf.PDFObject
DATE_FORMAT, log
 
Constructor Summary
PDFRoot(int objnum, PDFPages pages)
          create a Root (/Catalog) object.
 
Method Summary
 void addOutputIntent(PDFOutputIntent outputIntent)
          Adds an OutputIntent to the PDF
 void addPage(PDFPage page)
          add a /Page object to the root /Pages object
 PDFMetadata getMetadata()
           
 PDFNames getNames()
           
 PDFOutline getRootOutline()
          Get the root PDF outline for the document.
 void setMetadata(PDFMetadata meta)
          Set the optional Metadata object.
 void setNames(PDFNames names)
          Set the Names object.
 void setPageMode(int mode)
          Set the page mode for the PDF document.
 void setRootOutline(PDFOutline out)
          Set the root outline for the PDF document.
 void setRootPages(PDFPages pages)
          set the root /Pages object
 java.lang.String toPDFString()
          This method returns a String representation of the PDF object.
 
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

PAGEMODE_USENONE

public static final int PAGEMODE_USENONE
Use no page mode setting, default

See Also:
Constant Field Values

PAGEMODE_USEOUTLINES

public static final int PAGEMODE_USEOUTLINES
Use outlines page mode to show bookmarks

See Also:
Constant Field Values

PAGEMODE_USETHUMBS

public static final int PAGEMODE_USETHUMBS
Use thumbs page mode to show thumbnail images

See Also:
Constant Field Values

PAGEMODE_FULLSCREEN

public static final int PAGEMODE_FULLSCREEN
Full screen page mode

See Also:
Constant Field Values

rootPages

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

Constructor Detail

PDFRoot

public PDFRoot(int objnum,
               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:
objnum - the object's number
pages - the PDFPages object
Method Detail

setPageMode

public void setPageMode(int mode)
Set the page mode for the PDF document.

Parameters:
mode - the page mode

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 out)
Set the root outline for the PDF document.

Parameters:
out - the root PDF Outline

getRootOutline

public PDFOutline getRootOutline()
Get the root PDF outline for the document.

Returns:
the root PDF Outline

setNames

public void setNames(PDFNames names)
Set the Names object.

Parameters:
names - the Names object
Since:
PDF 1.2

getNames

public PDFNames getNames()
Returns:
the Names object if set, null otherwise.
Since:
PDF 1.2

setMetadata

public void setMetadata(PDFMetadata meta)
Set the optional Metadata object.

Parameters:
meta - the Metadata object
Since:
PDF 1.4

getMetadata

public PDFMetadata getMetadata()
Returns:
the Metadata object if set, null otherwise.
Since:
PDF 1.4

addOutputIntent

public void addOutputIntent(PDFOutputIntent outputIntent)
Adds an OutputIntent to the PDF

Parameters:
outputIntent - the OutputIntent dictionary

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.