You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2017/09/26 16:15:01 UTC

[jira] [Updated] (PDFBOX-3942) ClassCastException in getOptionalContentGroups

     [ https://issues.apache.org/jira/browse/PDFBOX-3942?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tilman Hausherr updated PDFBOX-3942:
------------------------------------
    Fix Version/s: 3.0.0
                   2.0.8

> ClassCastException in getOptionalContentGroups
> ----------------------------------------------
>
>                 Key: PDFBOX-3942
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3942
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 2.0.6
>            Reporter: Vlad-Tudor Marchis
>            Priority: Minor
>              Labels: support
>             Fix For: 2.0.8, 3.0.0
>
>         Attachments: PDOptionalContentProperties.java
>
>
> I noticed this issue when trying to remove a set of layers I previously added on a multi-page PDF. I noticed it in version 2.0.6, but might be present in others.
> Here is a stacktrace snippet:
> Caused by: java.lang.ClassCastException: org.apache.pdfbox.cos.COSDictionary cannot be cast to org.apache.pdfbox.cos.COSObject
> at org.apache.pdfbox.pdmodel.graphics.optionalcontent.PDOptionalContentProperties.getOptionalContentGroups(PDOptionalContentProperties.java:180).
> I looked at the source and saw the toDictionary method that seemed to be used in every other place so I just put in in place and it seems to have solved the issue.
> I've uploaded the updated file, the one that I'm using, which you can review and include in your project if it's a valid fix. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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