I am planning to use JODConverter
to do my conversion of office files to PDF. From the tutorial I read that the API instance should be started when the web app starts and closed when the web app closes.
The code would be something like
// web app starts
OfficeManager officeManager = new ManagedProcessOfficeManager();
officeManager.start();
OfficeDocumentConverter converter = new OfficeDocumentConverter(officeManager);
converter.convert(sourceFile,targetFile);
// web app stops
officeManager.stop();
The question is where do put the lines of code for starting and stopping the instance (XML or Java classes) ?