Class PrintDocumentMetaData
java.lang.Object
org.apache.pdfbox.examples.pdmodel.PrintDocumentMetaData
This is an example on how to get a documents metadata information.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate StringformatDate(Calendar date) This will format a date object.static voidThis will print the documents data.voidprintMetadata(PDDocument document) This will print the documents data to System.out.private static voidusage()This will print the usage for this document.
-
Constructor Details
-
PrintDocumentMetaData
public PrintDocumentMetaData()
-
-
Method Details
-
main
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
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
This will format a date object.- Parameters:
date- The date to format.- Returns:
- A string representation of the date.
-