I was not able to run pdf2svg using "java pdf2svg [options] PDFFile". I looked into the proposed "pdf2svg.sh" script, but this seemed complicated to me. Instead, pdf2svg could use the appassembler maven plugin (http://mojo.codehaus.org/appassembler/appassembler-maven-plugin/), which bundles any Maven code into an executable application (Win and Unixes), and it just works.
Here is what you would need to add to pom.xml
<build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>appassembler-maven-plugin</artifactId> <version>1.3</version> <configuration> <!-- CHANGE IT <extraJvmArguments>-Xms1G -Dfile.encoding=UTF8</extraJvmArguments> --> <programs> <program> <mainClass>org.xmlcml.pdf2svg.PDF2SVGConverter</mainClass> <name>pdf2svg_converter</name> </program> </programs> </configuration> </plugin> </plugins> </build>
The application can be built like that:
$> mvn clean package appassembler:assemble
... and then called like this
$> cd target/appassembler $> ./bin/pdf2svg_converter [Options] file