How to Set an Image’s Size in a PDF Using PDF.co and Zapier

5 Minutes Read

This tutorial shows how to add an image to a PDF and control its size and position using PDF.co and Zapier.

Prerequisites

You will need:

  • A Zapier account
  • A PDF.co account
  • A source PDF
  • A directly accessible URL for the image

Step 1: Create the Google Drive Trigger

Create a Zap and select:

  • App: Google Drive
  • Trigger event: New File in Folder

Connect your Google Drive account, select the folder containing incoming PDFs, and test the trigger with a sample PDF.

Step 2: Add the PDF.co Action

Add another step:

  • App: PDF.co
  • Action: Add Image to PDF

Connect your PDF.co account by signing in and authorizing Zapier.

Step 3: Configure the Source PDF and Image

Configure the action:

  • Source PDF URL: Map the File value from Google Drive.
  • Image URL: Enter a direct URL for the image.
  • X: Enter the image’s horizontal position.
  • Y: Enter the image’s vertical position.
  • Pages: Enter 0 for the first page or 0- for every page.
  • Width: Enter 300.
  • Height: Enter 300.
  • Keep Aspect Ratio: Select True.
  • Output PDF Name: Enter a name such as pdf-with-image.pdf.

The X and Y coordinates begin at the upper-left corner of the page. Use the PDF Inspector to determine the appropriate position and dimensions.

Width and height use the PDF coordinate system rather than screen pixels. With Keep Aspect Ratio enabled, PDF.co fits the image within the specified dimensions without stretching it. Disable this option only when the image must use the exact width and height.

Step 4: Test the Action

Test the PDF.co step and open the returned URL.

Confirm that:

  • The image appears on the intended page.
  • Its position is correct.
  • Its dimensions fit the available space.
  • Its proportions have been preserved.

Adjust the X, Y, width, or height values and retest if necessary.

Step 5: Save the PDF

PDF.co output URLs are temporary. Add another Zapier action to upload the completed PDF to Google Drive, Dropbox, OneDrive, or another permanent destination.

Map the PDF.co output URL into the destination app’s file field.

Conclusion

The Zap now adds an image to each incoming PDF using defined coordinates and dimensions. The same configuration can be used for logos, signatures, stamps, product images, and other graphics.

Related Tutorials

See Related Tutorials