throw new FOPException("PDF/A mode already set");
}
renderingOptions.put("pdf-a-mode", pdfAMode.getName());
return 1;
} else {
PDFXMode pdfXMode = PDFXMode.valueOf(profile);
if (pdfXMode != null && pdfXMode != PDFXMode.DISABLED) {
if (renderingOptions.get("pdf-x-mode") != null) {
throw new FOPException("PDF/X mode already set");
}
renderingOptions.put("pdf-x-mode", pdfXMode.getName());
return 1;
}
}
throw new FOPException("Unsupported PDF profile: " + profile);
}