You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Benjamin Ettori (Jira)" <ji...@apache.org> on 2020/07/06 18:54:00 UTC

[jira] [Comment Edited] (PDFBOX-4905) Getting IllegalArgumentException when extracting telemetry from PDF: PDLayoutDontCare

    [ https://issues.apache.org/jira/browse/PDFBOX-4905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17152177#comment-17152177 ] 

Benjamin Ettori edited comment on PDFBOX-4905 at 7/6/20, 6:53 PM:
------------------------------------------------------------------

[~msahyoun] I cannot share the document as it is confidential customer data. However, the customer said they created it by selecting the "Save as Pdf" command in Microsoft Outlook.

OS: Windows 10

Outlook for Office 365


was (Author: bettori):
[~msahyoun] I cannot share the document as it is confidential customer data. However, the customer said they created it by selecting the "Save as Pdf" command in Microsoft Outlook.

> Getting IllegalArgumentException when extracting telemetry from PDF: PDLayoutDontCare
> -------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-4905
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4905
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 2.0.17, 2.0.18, 2.0.19
>            Reporter: Benjamin Ettori
>            Priority: Major
>
> Given the following code
> {code:java}
> val catalog: PDDocumentCatalog = pdf.getDocumentCatalog
> catalog.getPageLayout
> {code}
>  
> For a specific document, catalog.getPageLayout throws an IllegalArgumentException with the following trace
>  
>  
> {code:java}
> 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)
> {code}
>  
> Looking at the source code for PageLayout we have the following values
> {code:java}
> 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");
> {code}
> The PDLayoutDontCare option is not present. However according to the pdf spec it is a valid value
>  
> [https://help.adobe.com/pdfl_sdk/15/PDFL_SDK_HTMLHelp/PDFL_SDK_HTMLHelp/API_References/PDFL_API_Reference/PD_Layer/General.html#PDLayoutModePDLayoutDontCare]
>  
> Can you please fix this case?
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org