org.pdfbox.examples.pdmodel

Class PrintBookmarks


public class PrintBookmarks
extends java.lang.Object

This is an example on how to access the bookmarks that are part of a pdf document. Usage: java org.pdfbox.examples.pdmodel.PrintBookmarks <input-pdf>
Version:
$Revision: 1.2 $
Author:
Ben Litchfield

Method Summary

static void
main(String[] args)
This will print the documents data.
void
printBookmark(PDOutlineNode bookmark, String indentation)
This will print the documents bookmarks to System.out.

Method Details

main

public static void main(String[] args)
            throws Exception
This will print the documents data.
Parameters:
args - The command line arguments.

printBookmark

public void printBookmark(PDOutlineNode bookmark,
                          String indentation)
            throws IOException
This will print the documents bookmarks to System.out.
Parameters:
bookmark - The bookmark to print out.
indentation - A pretty printing parameter