@Override public Boolean getOverprintForFill() { if (exGState != null && !exGState.empty()) { return exGState.getNonStrokingOverprintControl(); } return null; }
@Override public Boolean getOverprintForStroke() { if (exGState != null && !exGState.empty()) { return exGState.getStrokingOverprintControl(); } return null; }
@Override public Boolean getTransparency() { if (exGState != null && !exGState.empty()) { Boolean res = exGState.getAlphaSourceFlag(); return res == null ? null : !res.booleanValue(); } return null; }
@Override public Boolean getStrokeAdjustment() { if (exGState != null && !exGState.empty()) { return exGState.getAutomaticStrokeAdjustment(); } return null; }
public void copyPropertiesFormExtGState(PDExtGState extGState) { if (extGState != null) { //TODO : copy font settings Boolean oFS = extGState.getStrokingOverprintControl(); if (oFS != null) { this.overprintingFlagStroke = oFS.booleanValue(); } Boolean oFNS = extGState.getNonStrokingOverprintControl(); if (oFNS != null) { this.overprintingFlagNonStroke = oFNS.booleanValue(); } Long opm = extGState.getOverprintMode(); if (opm != null) { this.opm = opm.intValue(); } } }
public void copyPropertiesFormExtGState(PDExtGState extGState) { if (extGState != null) { COSObject smask = extGState.getCOSSMask(); if (smask != null) { this.sMask = smask; } COSObject bm = extGState.getCOSBM(); if (bm != null) { this.bm = bm; } Double ca_ns = extGState.getCA_NS().getReal(); if (ca_ns != null) { this.ca_ns = ca_ns.floatValue(); } Double ca = extGState.getCA().getReal(); if (ca != null) { this.ca = ca.floatValue(); } } }
private Set<String> parseExGStateFromResource(PDResources resources) { if (resources == null || resources.getExtGStateNames() == null) { return null; } Set<String> gStatesIDs = new HashSet<>(); for (ASAtom name : resources.getExtGStateNames()) { PDExtGState exGState = resources.getExtGState(name); if (exGState != null) { String id = getId(exGState.getObject(), FeatureObjectType.EXT_G_STATE); gStatesIDs.add(id); if (checkIDBeforeProcess(id)) { parseExGState(exGState, id); } } } return gStatesIDs; }
private void parseExGState(PDExtGState exGState, String id) { String childFontID = null; PDFont font = exGState.getFont(); if (font != null) { childFontID = getId(font.getObject(), FeatureObjectType.FONT); if (checkIDBeforeProcess(childFontID)) { parseFont(font, childFontID); } } childFontID = config.isFeatureEnabled(FeatureObjectType.FONT) ? childFontID : null; reporter.report(GFFeaturesObjectCreator.createExtGStateFeaturesObject(exGState, id, childFontID)); }
public Boolean getNonStrokingOverprintControl() { Boolean opNS = getBooleanKey(ASAtom.OP_NS); return opNS == null ? getBooleanKey(ASAtom.OP) : opNS; }
public PDExtGState getExtGState(ASAtom name) { if (extGStateMap.containsKey(name)) { return extGStateMap.get(name); } COSObject rawExtGState = getResource(ASAtom.EXT_G_STATE, name); PDExtGState extGState = new PDExtGState(rawExtGState); extGStateMap.put(name, extGState); return extGState; }
@Override public boolean isPDFObjectPresent() { return exGState != null && !exGState.empty(); }
@Override public Double getCA() { COSObject ca = ((org.verapdf.pd.PDExtGState) simplePDObject).getCA(); if (ca.getType().isNumber()) { return ca.getReal(); } else if (ca.empty()) { return null; } else { LOGGER.log(Level.SEVERE, "Value of CA key is not a number. Ignoring CA"); return 2.0; // check is failed } }
PDExtGState extGState = shadingPattern.getExtGState(); if (extGState != null) { exGStateID = getId(extGState.getObject(), FeatureObjectType.EXT_G_STATE); if (checkIDBeforeProcess(exGStateID)) { parseExGState(extGState, exGStateID);
public Boolean getAlphaSourceFlag() { return getBooleanKey(ASAtom.AIS); }
public PDExtGState getExtGState() { COSObject obj = getKey(ASAtom.EXT_G_STATE); if (obj.getType() == COSObjType.COS_DICT) { return new PDExtGState(obj); } return null; } }
public Boolean getAutomaticStrokeAdjustment() { return getBooleanKey(ASAtom.SA); }
public Boolean getStrokingOverprintControl() { return getBooleanKey(ASAtom.OP); }