org.apache.pdfbox.examples.pdmodel
Class PrintDocumentMetaData

java.lang.Object
  extended by org.apache.pdfbox.examples.pdmodel.PrintDocumentMetaData

public class PrintDocumentMetaData
extends Object

This is an example on how to get a documents metadata information. Usage: java org.apache.pdfbox.examples.pdmodel.PrintDocumentMetaData <input-pdf>

Version:
$Revision: 1.11 $
Author:
Ben Litchfield

Constructor Summary
PrintDocumentMetaData()
           
 
Method Summary
static void main(String[] args)
          This will print the documents data.
 void printMetadata(PDDocument document)
          This will print the documents data to System.out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrintDocumentMetaData

public PrintDocumentMetaData()
Method Detail

main

public static void main(String[] args)
                 throws Exception
This will print the documents data.

Parameters:
args - The command line arguments.
Throws:
Exception - If there is an error parsing the document.

printMetadata

public void printMetadata(PDDocument document)
                   throws IOException
This will print the documents data to System.out.

Parameters:
document - The document to get the metadata from.
Throws:
IOException - If there is an error getting the page count.


Copyright © 2002-2010 The Apache Software Foundation. All Rights Reserved.