I'm using xDocReport to generate pdfs from both Docx and Odt files, everything works great except for the IPdfWriterConfiguration that doesn't seem to get recongnized or called when the conversion happens.
PdfOptions pdfOptions = PdfOptions.create();
pdfOptions.setConfiguration(new IPdfWriterConfiguration() {
// This is never called
public void configure(PdfWriter writer) {
try {
writer.setEncryption("Hello".getBytes(), "Hello".getBytes(),
PdfWriter.ALLOW_COPY,
PdfWriter.STANDARD_ENCRYPTION_128 | PdfWriter.DO_NOT_ENCRYPT_METADATA);
writer.createXmpMetadata();
} catch (DocumentException ex) {
throw new RuntimeException(ex);
}
}
});
Options options = Options.getTo(ConverterTypeTo.PDF).subOptions(pdfOptions);
OutputStream out = new FileOutputStream(tempPdfFile);
try {
report.convert(context, options, out);
} finally {
out.close();
}