Package org.artofsolving.jodconverter.office

Examples of org.artofsolving.jodconverter.office.DefaultOfficeManagerConfiguration


        }
        return null;
    }

    public static void startService(){
        DefaultOfficeManagerConfiguration configuration = new DefaultOfficeManagerConfiguration();
        try {
            LOGGER.debug("准备启动服务....");
            configuration.setOfficeHome(getOfficeHome());
            configuration.setPortNumbers(getPort());
            configuration.setTaskExecutionTimeout(1000 * 60 * 5L);
            configuration.setTaskQueueTimeout(1000 * 60 * 60 * 24L);
            if (CONNECTION_PROTOCOL != null) {
                configuration.setConnectionProtocol(CONNECTION_PROTOCOL);
            }
            if (OFFICE_PROFILE != null) {
                configuration.setTemplateProfileDir(OFFICE_PROFILE);
            }
            officeManager = configuration.buildOfficeManager();
            officeManager.start();
            LOGGER.debug("office转换服务启动成功!");
        } catch (Exception ce) {
            LOGGER.error("office转换服务启动失败!详细信息:" + ce);
        }
View Full Code Here


    /**
     * Initializes an instance of this class.
     */
    public LocalOfficeManagerFactory() {
        super();
        cfg = new DefaultOfficeManagerConfiguration();
    }
View Full Code Here

    convert2PDF(inputFile, pdfFile, extend);

  }

  public static void startService() {
    DefaultOfficeManagerConfiguration configuration = new DefaultOfficeManagerConfiguration();
    try {
      // 准备启动服务
      configuration.setOfficeHome(OFFICE_HOME);// 设置OpenOffice.org安装目录
      // 设置转换端口,默认为8100
      configuration.setPortNumbers(port);
      // 设置任务执行超时为5分钟
      configuration.setTaskExecutionTimeout(1000 * 60 * 5L);
      // 设置任务队列超时为24小时
      configuration.setTaskQueueTimeout(1000 * 60 * 60 * 24L);

      officeManager = configuration.buildOfficeManager();
      officeManager.start(); // 启动服务
      org.jeecgframework.core.util.LogUtil.info("office转换服务启动成功!");
    } catch (Exception ce) {
      org.jeecgframework.core.util.LogUtil.info("office转换服务启动失败!详细信息:" + ce);
    }
View Full Code Here

TOP

Related Classes of org.artofsolving.jodconverter.office.DefaultOfficeManagerConfiguration

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.