Package com.artofsolving.jodconverter.openoffice.converter

Examples of com.artofsolving.jodconverter.openoffice.converter.OpenOfficeDocumentConverter


          }
          else if(dokeosMode.equals("woogie")){
            converter = new WoogieDocumentConverter(connection, new DokeosDocumentFormatRegistry(), width, height);
          }
          else {
            converter = new OpenOfficeDocumentConverter(connection);
          }
         
         
            if (outputFormat == null) {
                File inputFile = new File(fileNames[0]);
View Full Code Here


                    .println("ERROR: connection failed. Please make sure OpenOffice.org is running and listening on port "
                            + port + ".");
            System.exit(EXIT_CODE_CONNECTION_FAILED);
        }
        try {
            DocumentConverter converter = new OpenOfficeDocumentConverter(connection);
            if (outputFormat == null) {
                File inputFile = new File(fileNames[0]);
                File outputFile = new File(fileNames[1]);
                convertOne(converter, inputFile, outputFile, verbose);
            } else {
View Full Code Here

        } catch (ConnectException officeNotRunning) {
            System.err.println("ERROR: connection failed. Please make sure OpenOffice.org is running and listening on port " + port + ".");
            System.exit(EXIT_CODE_CONNECTION_FAILED);
        }
        try {
            DocumentConverter converter = new OpenOfficeDocumentConverter(connection, registry);
            if (outputFormat == null) {
                File inputFile = new File(fileNames[0]);
                File outputFile = new File(fileNames[1]);
                convertOne(converter, inputFile, outputFile, verbose);
            } else {
View Full Code Here

    //--------------------------------------------
    // Connect to server and create the converter
    //--------------------------------------------
   
    DocumentConverter converter = new OpenOfficeDocumentConverter(aConnection);
       
    //---------------------------------------------
    // Convert the document to the selected format
    //---------------------------------------------
   
    logger.info("Converting from " + aInputFile.getPath() + " to " + aOutputFile.getPath());
   
    converter.convert(aInputFile, aOutputFile);
   
    logger.info("Conversion complete");
  }
View Full Code Here

                "Start with: soffice -accept=\"socket,host=127.0.0.1,port=" + port + ";urp;\"", connectException);
        }
       
        getLog().info("Converting documents from " + sourceDirectory + " to " + outputDirectory + " ...");
        try {
            DocumentConverter converter = new OpenOfficeDocumentConverter(connection);
            for (int inputIndex = 0; inputIndex < sourceNames.length; inputIndex++) {
                String inputName = sourceNames[inputIndex];
                File inputFile = FileUtils.resolveFile(sourceDirectory, inputName);
                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

        } catch (ConnectException officeNotRunning) {
            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

Related Classes of com.artofsolving.jodconverter.openoffice.converter.OpenOfficeDocumentConverter

Copyright © 2018 www.massapicom. 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.