private int parsePDFOutputOption(String[] args, int i, String pdfAMode) throws FOPException {
setOutputMode(MimeConstants.MIME_PDF);
if ((i + 1 == args.length)
|| (args[i + 1].charAt(0) == '-')) {
throw new FOPException("you must specify the PDF output file");
} else {
outfile = new File(args[i + 1]);
if (pdfAMode != null) {
if (renderingOptions.get("pdf-a-mode") != null) {
throw new FOPException("PDF/A mode already set");
}
renderingOptions.put("pdf-a-mode", pdfAMode);
}
return 1;
}