Package com.artofsolving.jodconverter

Examples of com.artofsolving.jodconverter.DocumentConverter.convert()


    // Convert the document to the selected format
    //---------------------------------------------
   
    logger.info("Converting from " + aInputFile.getPath() + " to " + aOutputFile.getPath());
   
    converter.convert(aInputFile, aOutputFile);
   
    logger.info("Conversion complete");
  }
 
  public static File extractContentXml(File aOdtFile, String aTargetDirectory) throws ZipException, IOException
View Full Code Here


                for (int formatIndex = 0; formatIndex < outputFormats.length; formatIndex++) {
                    String format = outputFormats[formatIndex];
                    String outputName = FileUtils.removeExtension(inputName) + "." + format;
                    File outputFile = FileUtils.resolveFile(outputDirectory, outputName);
                    getLog().info("converting " + inputName + " to " + outputName);
                    converter.convert(inputFile, outputFile);
                }
            }
        } finally {
            connection.disconnect();
        }
View Full Code Here

            System.err.println("ERROR: connection failed. Please make sure OpenOffice.org is running and listening on port "+ SocketOpenOfficeConnection.DEFAULT_PORT +".");
            return EXIT_CODE_CONNECTION_FAILED;
        }
        try {
            DocumentConverter converter = new OpenOfficeDocumentConverter(connection);
            converter.convert(inputFile, outputFile);
        } finally {
            connection.disconnect();
        }
        return EXIT_CODE_SUCCESS;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.