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.
  • 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.
    • usage

      private static void usage()
      This will print the usage for this document.
    • printBookmark

      public void printBookmark(PDDocument document, 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.