To integrate Qoppa’s PDF library jPDFWeb with PHP, the simplest approach is to create a small command line application in Java that makes the appropriate calls to jPDFWeb, and then to call that application from your PHP scripts.

Here is a sample command line interface (CLI) application on our website here:
PDFWebCLI.java – The main CLI program.
JobInfo.java – Class to hold command line options.
CLIException.java – Exception class to handle errors.

Look for the section called “jPDFWeb CLI Sample”.  You can take the source code to get started and then modify it to include additional options.  Once compiled, you would call the CLI something like this:

java -cp <classpath> jPDFWebSamples.cli.PDFWebCLI -input input.pdf -output output.svg

where <classpath> is the path to the folder that holds the jPDFWebSamples folder. 

You can modify the Java package and class names as you see fit.

To call from PHP, you would use the exec() function, i.e.

exec(“java -cp …”)