*/
public void printMetadata( PDDocument document ) throws IOException
{
PDDocumentInformation info = document.getDocumentInformation();
PDDocumentCatalog cat = document.getDocumentCatalog();
PDMetadata metadata = cat.getMetadata();
System.out.println( "Page Count=" + document.getNumberOfPages() );
System.out.println( "Title=" + info.getTitle() );
System.out.println( "Author=" + info.getAuthor() );
System.out.println( "Subject=" + info.getSubject() );
System.out.println( "Keywords=" + info.getKeywords() );
System.out.println( "Creator=" + info.getCreator() );
System.out.println( "Producer=" + info.getProducer() );
System.out.println( "Creation Date=" + formatDate( info.getCreationDate() ) );
System.out.println( "Modification Date=" + formatDate( info.getModificationDate() ) );
System.out.println( "Trapped=" + info.getTrapped() );
if( metadata != null )
{
System.out.println( "Metadata=" + metadata.getInputStreamAsString() );
}
}