COSObjectable
public class PDOptionalContentProperties extends java.lang.Object implements COSObjectable
Modifier and Type | Class | Description |
---|---|---|
static class |
PDOptionalContentProperties.BaseState |
Enumeration for the BaseState dictionary entry on the "D" dictionary.
|
Constructor | Description |
---|---|
PDOptionalContentProperties() |
Creates a new optional content properties dictionary.
|
PDOptionalContentProperties(COSDictionary props) |
Creates a new instance based on a given
COSDictionary . |
Modifier and Type | Method | Description |
---|---|---|
void |
addGroup(PDOptionalContentGroup ocg) |
Adds an optional content group (OCG).
|
PDOptionalContentProperties.BaseState |
getBaseState() |
Returns the base state for optional content groups.
|
COSBase |
getCOSObject() |
Convert this standard java object to a COS object.
|
PDOptionalContentGroup |
getGroup(java.lang.String name) |
Returns the optional content group of the given name.
|
java.lang.String[] |
getGroupNames() |
Lists all optional content group names.
|
java.util.Collection<PDOptionalContentGroup> |
getOptionalContentGroups() |
Returns the collection of all optional content groups.
|
boolean |
hasGroup(java.lang.String groupName) |
Indicates whether a particular optional content group is found in the PDF file.
|
boolean |
isGroupEnabled(java.lang.String groupName) |
Indicates whether an optional content group is enabled.
|
void |
setBaseState(PDOptionalContentProperties.BaseState state) |
Sets the base state for optional content groups.
|
boolean |
setGroupEnabled(java.lang.String groupName,
boolean enable) |
Enables or disables an optional content group.
|
public PDOptionalContentProperties()
public PDOptionalContentProperties(COSDictionary props)
COSDictionary
.props
- the dictionarypublic COSBase getCOSObject()
getCOSObject
in interface COSObjectable
public PDOptionalContentGroup getGroup(java.lang.String name)
name
- the group namepublic void addGroup(PDOptionalContentGroup ocg)
ocg
- the optional content grouppublic java.util.Collection<PDOptionalContentGroup> getOptionalContentGroups()
public PDOptionalContentProperties.BaseState getBaseState()
public void setBaseState(PDOptionalContentProperties.BaseState state)
state
- the base statepublic java.lang.String[] getGroupNames()
public boolean hasGroup(java.lang.String groupName)
groupName
- the group namepublic boolean isGroupEnabled(java.lang.String groupName)
groupName
- the group namepublic boolean setGroupEnabled(java.lang.String groupName, boolean enable)
groupName
- the group nameenable
- true to enable, false to disable