Is there a way to use PDFBox to detect whether a given PDF is a PDF Package or PDF Portfolio (as opposed to a "regular" PDF)? I've been trying to figure this out for the past day, to no avail.
For reference, a PDF Package or PDF Portfolio is a single PDF file that actually contains multiple additional, embedded documents (PDFs and otherwise). According to Adobe's documentation, the difference between "regular" PDFs and Packages/Portfolios is that the latter contain a collection dictionary ( http://blogs.adobe.com/livecycledocs/2008/12/pdf_packages_vs_pdf_portfolios.html ): "The PDF Reference, sixth edition, version 1.7 (Acrobat 8) introduced the collection dictionary, which specifies how a viewer application’s user interface presents collections of file attachments. Acrobat 8 uses the term PDF Package to describe a PDF document that contains a collection dictionary." So if I read this correctly, I should be able to look for the collection dictionary... but I've been totally unable to figure out the right way to do this. (Generally, I get null responses or NullPointerExceptions when I try to get the document catalog for known PDF Portfolios or Packages.) There are example PDF Packages and Portfolios on the web, if anyone wants to take a look to see how best to find this dictionary; here's one example: http://acrobatusers.com/sites/default/files/gallery_pictures/Ted-Osuch_tf_acro_train.pdf Is there a way to do this? Thanks! Jason Levine

