Kind regards
Mirko
Thanks for the reply. Sounds like I need to change the source and
create this new class. Is this something that you think would benefit
the API? If so I am more than willing to donate code back to trunk.
Kind regards Shervin
http://groups.google.com/group/jodconverter/browse_thread/thread/2a2d8cc80e957811
or subclass DefaultDocumentFormatRegistry to add what you need. In
fact you could even use DefaultDocumentFormatRegistry directly like
this
DocumentFormatRegistry formatRegistry = new
DefaultDocumentFormatRegistry();
formatRegistry.getFormatByExtension("pdf").setInputFamily(DocumentFamily.DRAWING);
OfficeDocumentConverter converter = new
OfficeDocumentConverter(officeManager, formatRegistry);
Kind regards
Mirko
In case others needs to know:
/**
* This DocumentFormat must be used when converting from document
(not
pdf) to pdf/a
*/
private DocumentFormat toFormatPDFA() {
DocumentFormat format = new DocumentFormat("PDF/A", "pdf",
"application/pdf");
Map<String, Object> properties = new HashMap<String,
Object>();
properties.put("FilterName", "writer_pdf_Export");
Map<String, Object> filterData = new HashMap<String,
Object>();
filterData.put("SelectPdfVersion", this.PDFX1A2001);
properties.put("FilterData", filterData);
format.setStoreProperties(DocumentFamily.TEXT, properties);
return format;
}
/**
* This DocumentFormat must be used when converting from pdf to
pdf/a
*/
private DocumentFormat toFormatPDFA_DRAW() {
DocumentFormat format = new DocumentFormat("PDF/A", "pdf",
"application/pdf");
Map<String, Object> properties = new HashMap<String,
Object>();
properties.put("FilterName", "draw_pdf_Export");
Map<String, Object> filterData = new HashMap<String,
Object>();
filterData.put("SelectPdfVersion", this.PDFX1A2001);
properties.put("FilterData", filterData);
format.setStoreProperties(DocumentFamily.DRAWING, properties);
return format;
}
On Mar 22, 11:16 pm, Mirko Nasato <mirko.nas...@gmail.com> wrote:
> No need to change the source code, you can use
> JsonDocumentFormatRegistry with a configuration file in json format
>
> http://groups.google.com/group/jodconverter/browse_thread/thread/2a2d...