You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Stefan Ziel (JIRA)" <ji...@apache.org> on 2019/03/26 15:37:00 UTC

[jira] [Created] (PDFBOX-4496) OCG enablement with string parameter is not well defined

Stefan Ziel created PDFBOX-4496:
-----------------------------------

             Summary: OCG enablement with string parameter is not well defined
                 Key: PDFBOX-4496
                 URL: https://issues.apache.org/jira/browse/PDFBOX-4496
             Project: PDFBox
          Issue Type: Bug
    Affects Versions: 2.0.14
            Reporter: Stefan Ziel
         Attachments: original.pdf

The class {noformat} org.apache.pdfbox.pdmodel.graphics.optionalcontent.PDOptionalContentProperties
{noformat}
contains two methods
{noformat} setGroupEnabled(String, boolean){noformat}  and {noformat} isGroupEnabled(String){noformat} 
accessing the OCG's state using a name as parameter.
As there can exist various OCG with the same name this access is not well defined. 
The current implementation accesses the first group with this name it can find.

To make setter work the solution would be a loop over all groups with the given name and add them to the ON or OFF. 

The getter should return an error state if the instances diverge in state. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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