org.foray.pdf.object
Class PDFRoot

java.lang.Object
  extended by org.foray.pdf.object.PDFObject
      extended by org.foray.pdf.object.PDFRoot

public class PDFRoot
extends PDFObject

The Root (/Catalog) object.


Field Summary
 
Fields inherited from class org.foray.pdf.object.PDFObject
EOL, MSG_EOL, XREF_EOL
 
Constructor Summary
PDFRoot(PDFDocument doc)
          Create a Root (/Catalog) object.
 
Method Summary
 void addPage(PDFPage page)
          Add a /Page object to the root /Pages object.
 void addPageLabel(int pageIndex, PDFPageLabel pageLabel)
          Adds a range of pages to the page labels for this document.
 PDFNameTree<PDFDestination> getDestinations()
          Returns the destinations in this document.
 PDFNameTree<PDFEmbeddedFileStream> getEmbeddedFiles()
          Returns the embedded files in this document.
 PDFOutline getOutlineRoot()
          Returns the root Outlines object.
 String toPDF()
          Represent the object as PDF.
 
Methods inherited from class org.foray.pdf.object.PDFObject
bufferToByteArray, byteArrayToStream, getCharsPerLine, getGeneration, getLogger, getNumber, getPDFDocument, output, pdfID, pdfReference, setNumber, stringToByteArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PDFRoot

public PDFRoot(PDFDocument doc)
Create a Root (/Catalog) object.

Parameters:
doc - The parent PDF document.
Method Detail

addPage

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

Parameters:
page - the /Page object to add

addPageLabel

public void addPageLabel(int pageIndex,
                         PDFPageLabel pageLabel)
Adds a range of pages to the page labels for this document.

Parameters:
pageIndex - The 0-based page index of the first page in this range label.
pageLabel - The page label instance that handles formatting for page pageIndex until the next range label.

getDestinations

public PDFNameTree<PDFDestination> getDestinations()
Returns the destinations in this document.

Returns:
The destinations in this document.

getEmbeddedFiles

public PDFNameTree<PDFEmbeddedFileStream> getEmbeddedFiles()
Returns the embedded files in this document.

Returns:
The embedded files in this document.

getOutlineRoot

public PDFOutline getOutlineRoot()
Returns the root Outlines object.

Returns:
The root Outlines object.

toPDF

public String toPDF()
Represent the object as PDF.

Returns:
The PDF string


Copyright © 2017. All rights reserved.