Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8298133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T15:39:21+00:00 2026-06-08T15:39:21+00:00

I am using the JODConverter library V 3.0 Beta 4 along with Open Office

  • 0

I am using the JODConverter library V 3.0 Beta 4 along with Open Office 3.4 and am trying to convert some files into PDF/A-1 format. However after the office manager process starts up it simply hang and nothing happens. Here is the output:

Jul 26, 2012 12:04:03 PM org.artofsolving.jodconverter.office.ProcessPoolOfficeManager <init>
INFO: ProcessManager implementation is PureJavaProcessManager

C:\Users\Chris\AppData\Local\Temp\ArFile\PDF\blah.pdf : C:\Users\Chris\Documents\blah.txt

Jul 26, 2012 12:04:04 PM org.artofsolving.jodconverter.office.OfficeProcess start
INFO: starting process with acceptString 'socket,host=127.0.0.1,port=2002,tcpNoDelay=1' and profileDir 'C:\Users\Chris\AppData\Local\Temp\.jodconverter_socket_host-127.0.0.1_port-2002'
Jul 26, 2012 12:04:04 PM org.artofsolving.jodconverter.office.OfficeProcess start
INFO: started process

The line in the middle there is the output of printing the output file name and the input file name separated by a colon, as you can see they are valid values…

Here is my converter class:

package com.allcare.arfile;

import com.sun.star.beans.PropertyValue;
import java.io.File;
import java.util.HashMap;
import java.util.Map;
import org.artofsolving.jodconverter.OfficeDocumentConverter;
import org.artofsolving.jodconverter.document.DocumentFamily;
import org.artofsolving.jodconverter.document.DocumentFormat;
import org.artofsolving.jodconverter.office.DefaultOfficeManagerConfiguration;
import org.artofsolving.jodconverter.office.OfficeManager;


public class FileConverter 
{
OfficeManager officeManager;
String tempFilePath;

public FileConverter() 
{
    officeManager = new DefaultOfficeManagerConfiguration()
            //.setRetryTimeout(30000L)
            //.setTaskExecutionTimeout(60000L)
            .buildOfficeManager();
    tempFilePath = System.getProperty("java.io.tmpdir") + "\\ArFile\\PDF\\";
}

// if possible this function converts a file to a PDF/A-1 compliant file
public File convertToPdf(File inputFile, Log logger, User user)
{        
    if (isConvertableToPDF(inputFile.getName())) // REMEMBER TO CHANGE THE IF STATEMENT IN THE createMetadata() section to reflect this 
    {
        new File(tempFilePath).mkdirs();
        String filename = inputFile.getName();
        filename = filename.substring(0, filename.lastIndexOf("."));

        File outputFile = new File(tempFilePath + filename + ".pdf");

        System.out.println(outputFile + " : " + inputFile);

        officeManager.start(); // may tweak the start and stop code to appear elsewhere for additional efficiency

        DocumentFormat docFormat = new DocumentFormat("Portable Document Format", "pdf", "application/pdf");
        Map map = new HashMap();
        map.put("FilterName", "writer_pdf_Export");
        PropertyValue[] aFilterData = new PropertyValue[1];
        aFilterData[0] = new PropertyValue();
        aFilterData[0].Name = "SelectPdfVersion";
        aFilterData[0].Value = 1;
        map.put("FilterData", aFilterData);
        docFormat.setStoreProperties(DocumentFamily.TEXT, map);

        OfficeDocumentConverter docConverter = new OfficeDocumentConverter(officeManager);
        docConverter.convert(inputFile, outputFile, docFormat);

        officeManager.stop();

        return outputFile;
    }

    return inputFile;
}

// returns true if the file format is known to be convertible into the PDF/A-1 format
public boolean isConvertableToPDF(String filename)
{
    if (filename.endsWith(".doc") || filename.endsWith(".txt") || filename.endsWith(".xls") 
            || filename.endsWith(".ppt") || filename.endsWith(".docx"))
    {
        return true;
    }

    return false;
}

}

I am using java sockets, and before I used sockets the converter worked just fine, but after I changed to sockets it began to hang. I have no idea why…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T15:39:24+00:00Added an answer on June 8, 2026 at 3:39 pm

    The problem could be here:

    officeManager.start(); // may tweak the start and stop code ...
    

    If the code is waiting for the started process to finish, it may wait until you kill the OpenOffice service after which it fails the rest of the program.
    Make sure you start the service in a background service, so the main program can continue. Or start the OpenOffice server manually (outside your program). Don’t waitFor() since the service will never end.

    Your System.out.println() above does get printed, so up to there it is still working.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using JODConverter 3.0 to handle communicating with OpenOffice to convert documents. Everything is
Using C# .NET 3.5 and WCF, I'm trying to write out some of the
Using IOS, I am trying to integrate the LinkedIn into the application. The integration
Using the Exiv2 library to write some exif tags to an image i'm running
Using Point Cloud Library on Ubuntu, I am trying to take multiple point clouds
Using ASIHTTPRequest, I downloaded a zip file containing a folder with several audio files.
Using linq2sql I'm trying to take the string in txtOilChange and update the oilChange
Using the navigator.geolocation object in JavaScript. Trying to establish accurate ranges, but wondering exactly
Using Rails 3.2.0 with haml, sass and coffeescript: Basically I am trying to disable
I'm trying to use JODConverter on top of jetty and sinatra. Whenever I fire

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.