PageObject (JHOVE Documentation)
Date: 2013-09-08

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.harvard.hul.ois.jhove.module.pdf
Class PageObject

    java.lang.Object
      edu.harvard.hul.ois.jhove.module.pdf.DocNode
          edu.harvard.hul.ois.jhove.module.pdf.PageObject

    public class PageObject

extends DocNode

Class encapsulating a PDF page object node.

Field Summary

Fields inherited from class edu.harvard.hul.ois.jhove.module.pdf.DocNode
`_dict, _module, _pageObjectFlag, _parent, _walkFinished`

Constructor Summary
`PageObject(PdfModule module, PageTreeNode parent, PdfDictionary dict)` Superclass constructor.

Method Summary
`PdfArray` | `getAnnotations()` Return the page's Annots array of dictionaries, or null if none
`PdfArray` | `getArtBox()` Returns the ArtBox for the page, or null if none.
`PdfArray` | `getBleedBox()` Returns the BleedBox for the page, or null if none.
`java.util.List` | `getContentStreams()` Returns the List of content streams.
`PdfArray` | `getTrimBox()` Returns the TrimBox for the page, or null if none.
`void` | `loadContent(PdfModule module)` Find the content stream(s) for this page.
`DocNode` | `nextDocNode()` Called to walk through all page tree nodes and page objects.
`PageObject` | `nextPageObject()` Returns this object the first time it is called after startWalk is called, then null when called again.
`void` | `startWalk()` Call this function when recursively walking through a document tree.

Methods inherited from class edu.harvard.hul.ois.jhove.module.pdf.DocNode
`get, getDict, getFontResources, getMediaBox, getParent, getResources, isPageObject`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PageObject

    public PageObject(PdfModule module,
                      PageTreeNode parent,
                      PdfDictionary dict)

  Superclass constructor.

  Parameters:
    `module` - The module under which we're operating
    `parent` - The parent node in the document tree; may be null only for the root node
    `dict` - The dictionary object on which this node is based

Method Detail

### loadContent

    public void loadContent(PdfModule module)
                     throws PdfException

  Find the content stream(s) for this page. This is called when the page tree content stream is built by PageTreeNode. `getContentStreams` may subsequently be called to get the content.

  Throws:
    `PdfException`

### getContentStreams

    public java.util.List getContentStreams()

  Returns the List of content streams. The list elements are of type PdfStream.

### getAnnotations

    public PdfArray getAnnotations()
                            throws PdfException

  Return the page's Annots array of dictionaries, or null if none

  Throws:
    `PdfException`

### startWalk

    public void startWalk()

  Call this function when recursively walking through a document tree. This allows nextPageObject () to be return this object exactly once.

  Specified by:
    `startWalk` in class `DocNode`

### nextPageObject

    public PageObject nextPageObject()

  Returns this object the first time it is called after startWalk is called, then null when called again. This allows a recursive walk through a document tree to work properly.

  Specified by:
    `nextPageObject` in class `DocNode`

### nextDocNode

    public DocNode nextDocNode()

  Called to walk through all page tree nodes and page objects. Functionally identical with nextPageObject.

  Specified by:
    `nextDocNode` in class `DocNode`

### getArtBox

    public PdfArray getArtBox()
                       throws PdfException

  Returns the ArtBox for the page, or null if none. Throws a PDFException if there is an ArtBox but it is not a rectangle.

  Throws:
    `PdfException`

### getTrimBox

    public PdfArray getTrimBox()
                        throws PdfException

  Returns the TrimBox for the page, or null if none. Throws a PDFException if there is an TrimBox but it is not a rectangle.

  Throws:
    `PdfException`

### getBleedBox

    public PdfArray getBleedBox()
                         throws PdfException

  Returns the BleedBox for the page, or null if none. Throws a PDFException if there is an BleedBox but it is not a rectangle.

  Throws:
    `PdfException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD