2023.3 Migration Guide
PSPDFKit Processor 2023.3 exposes a brand-new endpoint for document processing and image rendering.
The previously exposed /process
and /render
endpoints in older versions of Processor are deprecated as of the 2023.2 release and will eventually be removed in upcoming versions of PSPDFKit Processor.
Instead of /process
and /render
, PSPDFKit now exposes the /build
endpoint.
Request Structure
Instead of sending operations
to /process
, send the instructions
to the /build
endpoint. The TypeScript representation of the instructions
for /build
is:
// For actions, each action has additional other properties discussed in the // relevant guides. type Action = { type: string; } // Represents one part that was sent in the multipart request. Should be the // `name` that was specified for the part. type MultipartReference = string; // The page index can be negative, indicating an offset from the last page, with -1 // being the last page itself. type PageIndex = number | "first" | "last"; type Pages = { start?: PageIndex end?: PageIndex } type FilePart = { file: MultipartReference; // The default is all pages. pages?: Pages; actions?: Action[]; }; type HTMLPart = { html: MultipartReference; assets? MultipartReference[]; actions?: Action[]; } type Part = FilePart | HTMLPart; type PDFOutput = { type: "pdf"; } type ImageOutput = { type: "image"; format: "jpg" | "jpeg" | "png" | "webp"; // The default is to render the first page. pages?: Pages; // One of width, height, or DPI needs to be specified. width?: number; height?: number; dpi?: number; } type Output = PDFOutput | ImageOutput; type Instructions = { parts: Part[]; actions?: Action[]; output?: Output; };
To learn more about the various options you can send to the /build
endpoint, go to the API Reference.
Performing Operations
The guides in this section have been updated with instructions showing how to perform OCR, watermarking, and Office-to-PDF conversion operations using the /build
endpoint.
To view older guides for the /process
and /render
endpoints, toggle the version of Processor at the top of the documentation page to an older one using the dropdown, as shown in the image below.
To learn more, go to the API Reference.
For a complete list of changes in this release, see the Processor changelog.