Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.0.17, 2.0.18, 2.0.19
-
None
-
None
Description
Given the following code
val catalog: PDDocumentCatalog = pdf.getDocumentCatalog catalog.getPageLayout
For a specific document, catalog.getPageLayout throws an IllegalArgumentException with the following trace
Error Detail:java.lang.IllegalArgumentException: PDLayoutDontCare at org.apache.pdfbox.pdmodel.PageLayout.fromString(PageLayout.java:54) at org.apache.pdfbox.pdmodel.PDDocumentCatalog.getPageLayout(PDDocumentCatalog.java:479)
Looking at the source code for PageLayout we have the following values
SINGLE_PAGE("SinglePage"), /** Display the pages in one column. */ ONE_COLUMN("OneColumn"), /** Display the pages in two columns), with odd numbered pages on the left. */ TWO_COLUMN_LEFT("TwoColumnLeft"), /** Display the pages in two columns), with odd numbered pages on the right. */ TWO_COLUMN_RIGHT("TwoColumnRight"), /** Display the pages two at a time), with odd-numbered pages on the left. */ TWO_PAGE_LEFT("TwoPageLeft"), /** Display the pages two at a time), with odd-numbered pages on the right. */ TWO_PAGE_RIGHT("TwoPageRight");
The PDLayoutDontCare option is not present. However according to the pdf spec it is a valid value
Can you please fix this case?