public class PdfOCProperties extends PdfObjectWrapper<PdfDictionary>
To be able to be wrapped with this PdfObjectWrapper the PdfObject
must be indirect.
| Constructor and Description |
|---|
PdfOCProperties(PdfDictionary ocPropertiesDict)
Creates a new PdfOCProperties instance by the dictionary it represents,
the dictionary must be an indirect object.
|
PdfOCProperties(PdfDocument document)
Creates a new PdfOCProperties instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addOCGRadioGroup(List<PdfLayer> group)
Use this method to set a collection of optional content groups
whose states are intended to follow a "radio button" paradigm.
|
static boolean |
checkDDictonaryFieldValue(PdfName field,
PdfObject value)
Checks if optional content group default configuration dictionary field value matches
the required value for this field, if one exists.
|
PdfObject |
fillDictionary()
Fills the underlying PdfDictionary object with the current layers and their settings.
|
PdfObject |
fillDictionary(boolean removeNonDocumentOcgs)
Fills the underlying PdfDictionary object with the current layers and their settings.
|
void |
flush() |
protected PdfDocument |
getDocument()
Gets the
PdfDocument that owns that OCProperties. |
List<PdfLayer> |
getLayers()
Gets the list of all the layers currently registered in the OCProperties.
|
protected boolean |
isWrappedObjectMustBeIndirect()
Defines if the object behind this wrapper must be an indirect object in the
resultant document.
|
protected void |
registerLayer(PdfLayer layer)
This method registers a new layer in the OCProperties.
|
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidReleasepublic PdfOCProperties(PdfDocument document)
document - the document the optional content belongs topublic PdfOCProperties(PdfDictionary ocPropertiesDict)
ocPropertiesDict - the dictionary of optional content properties, must have an indirect reference.public void addOCGRadioGroup(List<PdfLayer> group)
group - the radio grouppublic PdfObject fillDictionary()
public PdfObject fillDictionary(boolean removeNonDocumentOcgs)
removeNonDocumentOcgs - the flag indicating whether it is necessary
to delete OCGs not from the current documentpublic static boolean checkDDictonaryFieldValue(PdfName field, PdfObject value)
field - default configuration dictionary field.value - value of that field.public void flush()
flush in class PdfObjectWrapper<PdfDictionary>public List<PdfLayer> getLayers()
layers currently registered in the OCPropertiesprotected boolean isWrappedObjectMustBeIndirect()
PdfObjectWrapperisWrappedObjectMustBeIndirect in class PdfObjectWrapper<PdfDictionary>protected void registerLayer(PdfLayer layer)
layer - the new layerIllegalArgumentException - if layer param is nullprotected PdfDocument getDocument()
PdfDocument that owns that OCProperties.PdfDocument that owns that OCPropertiesCopyright © 1998–2024 Apryse Group NV. All rights reserved.