[
https://issues.apache.org/jira/browse/PDFBOX-1386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14177083#comment-14177083
]
Dominic Tubach commented on PDFBOX-1386:
----------------------------------------
The current implementation provides PDOptionalContentGroup and
PDOptionalContentProperties. Everything else requires to use COS objects
(ContentUsageDictionary, OptionalContentMembershipDictionary,
OptionalContentProperties, UsageApplicationDictionary). When I've written the
code I implemented the whole OCG stuff so that it can be used without directly
access to the COS objects. We use it for example to determine if an OCG is
visible or to remove an OCG from an OptionalContentMembershipDictionary.
If there's interest I would create a patch that can be integrated into PDFBox.
I'm not interested to do the work to see it vanish unused, though.
bq. DTPDOptionalContentGroup extends PDOptionalContentGroup. Couldn’t that be
handled by providing a patch to PDOptionalContentGroup?
A patch to PDOptionalContentGroup only, would require the new class
PDContentUsageDictionary and to return COSBase in getIntents() because the
current COSArrayList doesn't allow single values as the implementation I use
(#PDFBOX-1383) does. (Apart from additional entries in COSName.)
> Proposal for classes to handle optional contents
> ------------------------------------------------
>
> Key: PDFBOX-1386
> URL: https://issues.apache.org/jira/browse/PDFBOX-1386
> Project: PDFBox
> Issue Type: New Feature
> Components: PDModel
> Reporter: Dominic Tubach
> Priority: Minor
> Attachments: DTCOSName.java, DTPDContentUsageDictionary.java,
> DTPDContentUsageDictionaryTest.java, DTPDOptionalContentConfiguration.java,
> DTPDOptionalContentConfigurationTest.java, DTPDOptionalContentGroup.java,
> DTPDOptionalContentGroupTest.java,
> DTPDOptionalContentMembershipDictionary.java,
> DTPDOptionalContentMembershipDictionaryTest.java,
> DTPDOptionalContentProperties.java, DTPDOptionalContentPropertiesTest.java,
> DTPDUsageApplicationDictionary.java, DTPDUsageApplicationDictionaryTest.java
>
>
> Attached are classes as proposal to handle optional contents.
> It requires the classes in the issues #PDFBOX-1383 and #PDFBOX-1385
> It requires Java 1.6 (It might be enough to remove the @Override annotations
> for Java 1.5 compatibility.)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)