Class PrintDocumentMetaData

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

public class PrintDocumentMetaData extends Object
This is an example on how to get a documents metadata information.
  • Constructor Details

    • PrintDocumentMetaData

      public PrintDocumentMetaData()
  • 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.
    • 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.
    • formatDate

      private String formatDate(Calendar date)
      This will format a date object.
      Parameters:
      date - The date to format.
      Returns:
      A string representation of the date.