PDFreactor REST API Documentation

/convert

Converts the posted configuration into PDF or image and returns the generated PDF or image.

Parameters

Name Content Types Description Parameter Type Model
body
  • application/json
  • application/xml
The configuration to convert. post Configuration

Response Messages

Status Code Reasons Content Types Model Headers
200
  • Conversion successful
  • application/json
  • application/xml
  • application/pdf
  • application/octet-stream
  • image/bmp
  • image/gif
  • image/jpeg
  • image/png
  • image/tiff
  • text/plain
Result Location
400
  • No input document was specified in the configuration.
  • The supplied configuration was not valid for some reason. See the error message for details.
  • application/json
  • application/xml
  • text/plain
Result
422
  • The supplied configuration was accepted by PDFreactor but could not be converted for some reason. See the error message for details.
  • application/json
  • application/xml
  • text/plain
Result
500
  • No configuration was supplied to the operation.
  • The configuration could not be processed and should be re-checked.
  • The supplied configuration is valid, however the conversion could not be completed for some reason. See the error message for details.
  • application/json
  • application/xml
  • text/plain
Result

/convert/async

Converts the posted configuration into PDF or image. This operation responds immediately and does not wait for the conversion to finish. This is especially useful for very large or complex documents where the conversion will take some time.

Parameters

Name Content Types Description Parameter Type Model
body
  • application/json
  • application/xml
The configuration to convert. body Configuration

Response Messages

Status Code Reasons Content Types Model Headers
202
  • Conversion successfully started
String Location
400
  • No input document was specified in the configuration.
  • The supplied configuration was not valid for some reason. See the error message for details.
  • application/json
  • application/xml
  • text/plain
Result
422
  • The supplied configuration was accepted by PDFreactor but could not be converted for some reason. See the error message for details.
  • application/json
  • application/xml
  • text/plain
Result
500
  • No configuration was supplied to the operation.
  • The configuration could not be processed and should be re-checked.
  • The supplied configuration is valid, however the conversion could not be completed for some reason. See the error message for details.
  • application/json
  • application/xml
  • text/plain
Result
503
  • Asynchronous conversions are unavailable.
  • application/json
  • application/xml
  • text/plain
Result

/progress/{id}

Retrieves progress information about the conversion with the given ID.

Parameters

Name Content Types Description Parameter Type Model
id
  • String
The document ID. path

Response Messages

Status Code Reasons Content Types Model Headers
200
  • Conversion exists
  • application/json
  • application/xml
  • text/plain
Progress
201
  • Conversion is finished
  • application/json
  • application/xml
  • text/plain
Progress Location
404
  • Conversion does not exist
  • application/json
  • application/xml
  • text/plain
Result

/document/{id}

Returns the document with the given ID.

Parameters

Name Content Types Description Parameter Type Model
id
  • String
The document ID. path

Response Messages

Status Code Reasons Content Types Model Headers
200
  • The document was found and the conversion has finished.
  • application/json
  • application/xml
  • application/pdf
  • application/octet-stream
  • image/bmp
  • image/gif
  • image/jpeg
  • image/png
  • image/tiff
  • text/plain
Result
404
  • Conversion does not exist
  • application/json
  • application/xml
  • text/plain
Result

/document/{id}

Deletes the document with the given ID.

Parameters

Name Content Types Description Parameter Type Model
id
  • String
The document ID. path

Response Messages

Status Code Reasons Content Types Model Headers
204
  • Successfully deleted
404
  • Conversion does not exist
  • application/json
  • application/xml
  • text/plain
Result

/document/{id}/{page}

Returns the specified page of the multi-page image with the specified ID. This operation only functions when converting into image types, not PDF. Additionally, the configuration option "multiPage" has to be set to "true", otherwise there are no multiple pages.

Parameters

Name Content Types Description Parameter Type Model
id
  • String
The documentId. path
page
  • Integer
The desired page number. path

Response Messages

Status Code Reasons Content Types Model Headers
200
  • The document was found and the conversion has finished.
  • image/bmp
  • image/gif
  • image/jpeg
  • image/png
  • image/tiff
422
  • The page number you specified is either below 0 or exceeds the document's total number of pages.
  • application/json
  • application/xml
  • text/plain
Result
404
  • Conversion does not exist
  • application/json
  • application/xml
  • text/plain
Result

/document/{id}/show/{filename}

Displays the converted document in the browser. When downloading the document, browsers will save it under the specified filename.

Parameters

Name Content Types Description Parameter Type Model
id
  • String
The document ID. path
filename
  • String
The desired file name including the file extension. path

Response Messages

Status Code Reasons Content Types Model Headers
200
  • The document was found and the conversion has finished.
  • application/pdf
  • image/bmp
  • image/gif
  • image/jpeg
  • image/png
  • image/tiff
404
  • Conversion does not exist
  • application/json
  • application/xml
  • text/plain
Result

/document/{id}/{page}/show/{filename}

Displays the converted document in the browser. When downloading the document, browsers will save it under the specified filename.

Parameters

Name Content Types Description Parameter Type Model
id
  • String
The document ID. path
page
  • Integer
The desired page number. path
filename
  • String
The desired file name including the file extension. path

Response Messages

Status Code Reasons Content Types Model Headers
200
  • The document was found and the conversion has finished.
  • application/pdf
  • image/bmp
  • image/gif
  • image/jpeg
  • image/png
  • image/tiff
404
  • Conversion does not exist
  • application/json
  • application/xml
  • text/plain
Result

/document/{id}/download/{filename}

Downloads the converted document in the browser. The download is triggered by an appropriate "Content-Disposition" header. When downloading the document, browsers will save it under the specified filename.

Parameters

Name Content Types Description Parameter Type Model
id
  • String
The document ID. path
filename
  • String
The desired file name including the file extension. path

Response Messages

Status Code Reasons Content Types Model Headers
200
  • The document was found and the conversion has finished.
  • application/pdf
  • image/bmp
  • image/gif
  • image/jpeg
  • image/png
  • image/tiff
Content-Disposition
404
  • Conversion does not exist
  • application/json
  • application/xml
  • text/plain
Result

/document/{id}/{page}/download/{filename}

Downloads the specified page of the converted multi-page image in the browser. The download is triggered by an appropriate "Content-Disposition" header. When downloading the document, browsers will save it under the specified filename.

Parameters

Name Content Types Description Parameter Type Model
id
  • String
The document ID. path
page
  • Integer
The desired page number. path
filename
  • String
The desired file name including the file extension. path

Response Messages

Status Code Reasons Content Types Model Headers
200
  • The document was found and the conversion has finished.
  • image/bmp
  • image/gif
  • image/jpeg
  • image/png
  • image/tiff
Content-Disposition
404
  • Conversion does not exist
  • application/json
  • application/xml
  • text/plain
Result

/version

Returns the version of the PDFreactor web service that is currently running.

Parameters

None

Response Messages

Status Code Reasons Content Types Model Headers
200
  • The version was successfully retrieved.
  • application/json
  • application/xml
  • text/plain
Version

/status

Checks if the PDFreactor Web Service is available and functional.

Parameters

None

Response Messages

Status Code Reasons Content Types Model Headers
200
  • The PDFreactor Web Service is available and functional.
503
  • The PDFreactor Web Service is running but not functional.
  • application/json
  • application/xml
  • text/plain
Result