pdfUtil.setXMode(PDFXMode.valueOf(s));
}
Configuration encryptionParamsConfig
= cfg.getChild(PDFRenderer.ENCRYPTION_PARAMS, false);
if (encryptionParamsConfig != null) {
PDFEncryptionParams encryptionParams = new PDFEncryptionParams();
Configuration ownerPasswordConfig = encryptionParamsConfig.getChild(
PDFRenderer.OWNER_PASSWORD, false);
if (ownerPasswordConfig != null) {
String ownerPassword = ownerPasswordConfig.getValue(null);
if (ownerPassword != null) {
encryptionParams.setOwnerPassword(ownerPassword);
}
}
Configuration userPasswordConfig = encryptionParamsConfig.getChild(
PDFRenderer.USER_PASSWORD, false);
if (userPasswordConfig != null) {
String userPassword = userPasswordConfig.getValue(null);
if (userPassword != null) {
encryptionParams.setUserPassword(userPassword);
}
}
Configuration noPrintConfig = encryptionParamsConfig.getChild(
PDFRenderer.NO_PRINT, false);
if (noPrintConfig != null) {
encryptionParams.setAllowPrint(false);
}
Configuration noCopyContentConfig = encryptionParamsConfig.getChild(
PDFRenderer.NO_COPY_CONTENT, false);
if (noCopyContentConfig != null) {
encryptionParams.setAllowCopyContent(false);
}
Configuration noEditContentConfig = encryptionParamsConfig.getChild(
PDFRenderer.NO_EDIT_CONTENT, false);
if (noEditContentConfig != null) {
encryptionParams.setAllowEditContent(false);
}
Configuration noAnnotationsConfig = encryptionParamsConfig.getChild(
PDFRenderer.NO_ANNOTATIONS, false);
if (noAnnotationsConfig != null) {
encryptionParams.setAllowEditAnnotations(false);
}
pdfUtil.setEncryptionParams(encryptionParams);
}
s = cfg.getChild(PDFRenderer.KEY_OUTPUT_PROFILE, true).getValue(null);
if (s != null) {