Blog Post

Convert PDFs to Images (PNG or JPG) on Linux with PSPDFKit Processor 2021.2

Today we’re pleased to announce a new exciting feature for PSPDFKit Processor for Linux: document-to-image conversion, which allows you to convert PDF and Office files to images in no time.

Render Pages

With the new rendering API, you’ll be able to convert individual pages of documents to images without a hassle, with support for both PNG and JPEG as the output format:

curl http://localhost:5000/render \
  -F file=example.pdf \
  -F options='{
    "pageIndex": 0,
    "format": "jpeg",
	 "width": 500
  }' \
 -o cover.jpeg

Create Thumbnails

Need to display document thumbnails to your users? The exact same API used for rendering pages can be used to create Office or PDF file thumbnails. Just send the file, along with image dimensions, to get a thumbnail back:

curl http://localhost:5000/render \
  -F file=example.pdf \
  -F options='{
    "pageIndex": 0,
    "format": "png",
	 "width": 64
  }' \
 -o thumbnail.png

PDF and Office to Image

If you need to convert entire documents to images, we have you covered. Processor for Linux now allows you to render all of a document’s pages using a single API call, which returns the images conveniently packaged in a ZIP archive:

curl http://localhost:5000/render \
  -H 'Accept: application/zip' \
  -F file=example.docx \
  -F options='{
    "pageIndex": "all",
    "format": "jpeg",
	 "width": 500
  }' \
 -o pages.zip

Ease of Use

You can access the new rendering API via the HTTP protocol, which makes it easy to use with any programming language. Just pull the Processor Docker image, run it, and start rendering! Visit our guides to learn how to get started with Processor for Linux.

And More

This release also includes many more improvements, such as case-sensitive search-and-redact operations, and the ability to process TIFF files. For a complete list of changes, see the PSPDFKit Processor 2021.2 changelog as well as the migration guide. Make sure to update as soon as possible!

Related Products
PSPDFKit Processor

Product Page
Guides
API Docs

Share Post

Related Articles

Explore more
RELEASES  |  Windows • Products

PSPDFKit 2.11 for Windows: Electronic Signatures

RELEASES  |  iOS • Products

PSPDFKit 10.3 for iOS Adds Electronic Signatures and Instant Comments

RELEASES  |  Web • Products

PSPDFKit for Web 2021.3: Electronic Signatures