Forum How do I...?

How do I correctly pass an input-list file when using the Java wrapper?

arjana
We are invoking Prince from a Java application and therefore use the Java wrapper. All versions of com.princexml.wrapper.Prince#convert method require an input file (or files or paths to files) to be passed.

Sometimes we need to have a very big number of input files, and to avoid too long command line, we create a file with paths to those input files, and pass it using the --input-list command line option. What is the correct way to pass it using the Java wrapper?
mikeday
Could you use the PrinceControl interface? It has a convert method that takes a list of input paths (which are included in the JSON job file passed to Prince).

You could also use the new --job option to pass a job description file directly, which offers a little more flexibility over the --input-list text file, but would require you to create the JSON yourself and is probably less convenient than using the control interface.
adrianwong
Hi arjana,

If you haven't started using the PrinceControl interface, we've just released v1.4.0 of the Java wrapper which now contains the convertInputList method, which should be what you're after.