Class PrintBookmarks

java.lang.Object
org.apache.pdfbox.examples.pdmodel.PrintBookmarks

public class PrintBookmarks extends Object
This is an example on how to access the bookmarks that are part of a pdf document.
Author:
Ben Litchfield
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    main(String[] args)
    This will print the documents data.
    void
    printBookmark(org.apache.pdfbox.pdmodel.PDDocument document, org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineNode bookmark, String indentation)
    This will print the documents bookmarks to System.out.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PrintBookmarks

      public PrintBookmarks()
  • Method Details

    • main

      public static void main(String[] args) throws IOException
      This will print the documents data.
      Parameters:
      args - The command line arguments.
      Throws:
      IOException - If there is an error parsing the document.
    • printBookmark

      public void printBookmark(org.apache.pdfbox.pdmodel.PDDocument document, org.apache.pdfbox.pdmodel.interactive.documentnavigation.outline.PDOutlineNode bookmark, String indentation) throws IOException
      This will print the documents bookmarks to System.out.
      Parameters:
      document - The document.
      bookmark - The bookmark to print out.
      indentation - A pretty printing parameter
      Throws:
      IOException - If there is an error getting the page count.