ExifTool Forum

General => Metadata => Topic started by: richerm on November 19, 2010, 10:33:42 AM

Title: PDF Layout MetaData
Post by: richerm on November 19, 2010, 10:33:42 AM
Is it possible to have ExifTool read the layout preferences for a PDF?  (I.E. Two-Up with Cover Page, Two-Up, etc.).

I believe it is in the ViewerPreferences dictionary within the PDF.  I'm looking only for the PageLayout preference
http://www.evermap.com/autometadata.asp -- see the ViewerPreferences section in the screenshot.

I believe the possible values are:

SinglePage - Display one page at a time
OneColumn - Display the pages in one column (continuous display)
TwoColumnLeft - Display the pages in two columns, with odd-numbered pages on the left   - I believe this is 'No Gaps' between pages.
TwoColumnRight -  Display the pages in two columns, with odd-numbered pages on the right (PDF 1.5) - The 'right' versions essentially create a 'cover page' because the odd number is on the right.
TwoPageLeft - Display the pages two at a time, with odd-numbered pages on the left (PDF 1.5) - I believe this has 'Gaps' between pages.
TwoPageRight - Display the pages two at a time, with odd-numbered pages on the right  - The 'right' versions essentially create a 'cover page' because the odd number is on the right.
   
Please let me know if this is possible as that would be simply awesome!

Thanks for such a wonderful tool.



 
Title: Re: PDF Layout MetaData
Post by: Phil Harvey on November 19, 2010, 11:41:01 AM
You can use the -v option to show all information in the PDF.

It looks like you want to extract PageLayout.  If you have "grep", you could do this:

exiftool -v FILE | grep PageLayout

But if this is useful to you then I will add this to the list of tags extracted by ExifTool.

Note that this information doesn't exist in all PDF's.

- Phil
Title: Re: PDF Layout MetaData
Post by: richerm on November 19, 2010, 01:39:52 PM
Hi Phil,

Although the information is useful (since we like to know how they creator of the PDF intended it to be viewed) but I'm not sure others would find it useful, so I can just parse the verbose output for what I need.

If it gets added as a tag, perfect, otherwise, it is OK as is.

Thanks!

Matt
Title: Re: PDF Layout MetaData
Post by: Phil Harvey on November 19, 2010, 02:32:26 PM
Hi Matt,

Since this is in the main catalogue dictionary of the PDF it isn't too much trouble to extract it, so I think I'll add this to the next release.

- Phil