2021.1 Migration Guide

PSPDFKit Processor 2021.1 comes with a few notable changes.

PDF Generation

Processor lets you create PDF documents from scratch based on the HTML documents you design. The /process API now accepts HTML, stylesheets, and other assets as input, and it generates PDF documents out of them.

Make sure to read our PDF Generation guide to get started and create your first PDF!

New Authentication Options

Since JSON Web Token (JWT) authentication can be complicated, we introduced two new ways to use PSPDFKit Processor. The new default is no authentication at all. This is ideal for initially trying out the capabilities of Processor, since you can send HTTP requests with no need for a special setup for authentication.

We also added support for a simple API token-based authentication, where only a single secret is shared between Processor and client.

For more information, check out our Authentication guide.

Correlating Logs Using a Request ID

Log messages associated with HTTP requests are marked with a request_id=<request-id> label. Logs correlated with the same request have the same request ID. This helps you determine which request triggered a specific response and what errors or warnings were emitted during request processing.

Here’s an example request and response log with a matching request ID:

[info]  2021-02-05 12:00:34.097  POST /process request_id=FmDYakNs2xDF1NkAAASC
[info]  2021-02-05 12:00:34.168  Sent 200 in 70ms request_id=FmDYakNs2xDF1NkAAASC

You can also customize the request_id label by providing your own ID via the X-Request-Id request header. The custom request ID needs to be between 20 and 200 characters long.

Easier Office and Image Documents Conversion

To make using PSPDFKit Processor for document conversion easier, you no longer need to supply an operations parameter when calling POST /process. For example, to convert a DOCX file on your computer to PDF, you can use the following curl call:

curl -F file=@Example.docx \
  http://localhost:5000/process \
  --output result.pdf

Other Changes

For a complete list of changes in this release, check out the Processor changelog.