Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.14
Description
The class
org.apache.pdfbox.pdmodel.graphics.optionalcontent.PDOptionalContentProperties
contains two methods
setGroupEnabled(String, boolean)
and
isGroupEnabled(String)
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 the setter work a solution would be a loop over all groups with the given name and add them to ON or OFF. Consider to rename it to
setGroupsEnabledByName
The getter should return some error state if the groups diverge in state - or better drop it ...