The PDFreactor Web Service features a REST API (see Using the REST API) that can be used by practically any client that can perform HTTP requests. The two examples below show how to use the REST API via cURL and Wget to convert the configuration config.json and save the result to result.pdf.


cURL Example:

curl -v -X POST --header "Content-Type: text/json" --data-binary @config.json http://localhost:9423/service/rest/convert.pdf -o result.pdf

Please note that you should use --data-binary instead of -d to set the POST payload as -d removes all line breaks which is oftentimes undesirable.


Wget Example:

wget --header="Content-Type: text/json" --post-file=config.json http://localhost:9423/service/rest/convert.pdf -O result.pdf