154155156157158159160161162163164
} } } catch (com.artofsolving.jodconverter.openoffice.connection.OpenOfficeException e) { connection.disconnect(); System.err.println("ERROR: conversion failed."); System.exit(EXIT_CODE_CONVERSION_FAILED); } finally { if (verbose) {
162163164165166167168169170171172
} finally { if (verbose) { System.out.println("-- disconnecting"); } connection.disconnect(); } } private static void convertOne(DocumentConverter converter, File inputFile, File outputFile, boolean verbose) { if (verbose) {
121122123124125126127128129130131
} } finally { if (verbose) { System.out.println("-- disconnecting"); } connection.disconnect(); } } private static void convertOne(DocumentConverter converter, File inputFile, File outputFile, boolean verbose) { if (verbose) {
141142143144145146147148149150151
167168169170171172173174175176177
{ odtFile = aDocFile; } convertDocument(aDocFile, pdfFile, connection); connection.disconnect(); logger.info("Conversion END"); //------------------------------------------------ // Extract the content.xml file from the ODT file
130131132133134135136137138139140
getLog().info("converting " + inputName + " to " + outputName); converter.convert(inputFile, outputFile); } } } finally { connection.disconnect(); } } private String[] getIncludedFiles() { String[] includes = include.split(COMMA_AND_OR_WHITESPACE);
4950515253545556575859
} try { DocumentConverter converter = new OpenOfficeDocumentConverter(connection); converter.convert(inputFile, outputFile); } finally { connection.disconnect(); } return EXIT_CODE_SUCCESS; } public static void main(String[] args) throws Exception {