How to Compress PDF Files using Zapier and PDF.co Plugin with Custom API Call Action

You can easily compress PDF files using the PDF.co plugin for Zapier. PDF optimization is not listed as a separate action for PDF.co but with the Custom API Call action, you can access any API endpoint. This tutorial will demonstrate how to call pdf compression endpoint from PDF.co plugin for Zapier.

In this tutorial we will use a 5-page PDF file that contains text and images with 1,039KB file size.

Screenshot of PDF Compressor Source File
Screenshot of PDF Compressor Source File
Screenshot of the Source File’s File Size
Screenshot of the Source File’s File Size

Step 1: Set Action Event

To get started, let’s select PDF.co as the App and the Custom API Call as the Action Event.

Zapier Action Event

Step 2: Configure Custom API Call

Next, let’s configure our Custom API Call.

  • Select the v1/pdf/optimize in the API Endpoint field.
  • In the URL field, enter the file source link. It can be a URL, a link, a filetoken:// link or Google Drive, Dropbox, or another cloud storage link.
  • In the Run As Async Job field, select True. The Async mode is recommended to get a higher performance for this Custom API Call.
Configure Custom API Call

Step 3: Test Action

Finally, let’s test the Custom API Call action.

Test Custom API Call Action

Step 4: Output URL

Grab the url from the output as the link for the next step in your Zap. This link will open the output file generated.

Step 5: Result

Here’s the file size difference after the file compression.

Screenshot of Original And Result PDF File Size Difference
Screenshot of Original And Result PDF File Size Difference

Video Guide