Search in sources :

Example 1 with PDOptionalContentMembershipDictionary

use of com.tom_roush.pdfbox.pdmodel.graphics.optionalcontent.PDOptionalContentMembershipDictionary in project PdfBox-Android by TomRoush.

the class PageDrawer method isHiddenOCG.

private boolean isHiddenOCG(PDPropertyList propertyList) {
    if (propertyList instanceof PDOptionalContentGroup) {
        PDOptionalContentGroup group = (PDOptionalContentGroup) propertyList;
        RenderState printState = group.getRenderState(destination);
        if (printState == null) {
            if (!getRenderer().isGroupEnabled(group)) {
                return true;
            }
        } else if (RenderState.OFF.equals(printState)) {
            return true;
        }
    } else if (propertyList instanceof PDOptionalContentMembershipDictionary) {
        return isHiddenOCMD((PDOptionalContentMembershipDictionary) propertyList);
    }
    return false;
}
Also used : PDOptionalContentMembershipDictionary(com.tom_roush.pdfbox.pdmodel.graphics.optionalcontent.PDOptionalContentMembershipDictionary) RenderState(com.tom_roush.pdfbox.pdmodel.graphics.optionalcontent.PDOptionalContentGroup.RenderState) PDOptionalContentGroup(com.tom_roush.pdfbox.pdmodel.graphics.optionalcontent.PDOptionalContentGroup)

Aggregations

PDOptionalContentGroup (com.tom_roush.pdfbox.pdmodel.graphics.optionalcontent.PDOptionalContentGroup)1 RenderState (com.tom_roush.pdfbox.pdmodel.graphics.optionalcontent.PDOptionalContentGroup.RenderState)1 PDOptionalContentMembershipDictionary (com.tom_roush.pdfbox.pdmodel.graphics.optionalcontent.PDOptionalContentMembershipDictionary)1