add to pdf logo

Add to PDF

Add to PDF is a REST API tool that inserts new content into a PDF, including images and file attachments.  Place images with precision without disrupting underlying PDF content, and attach any file format to a PDF.

API Lab coming soon!

Soon you will be able to start right from your browser - upload files, choose parameters, generate code, and send API Calls directly from API Lab!

to receive your free API Key.

Why is pdfRest the best API to add image or attachment to PDF?

pdfRest offers the best solution for adding images or attachments to PDF documents, because it supports precise image positioning, variable data printing, and attaching any file.

Precise Image Positioning

The Add to PDF API Tool makes it easy to add an image to a PDF exactly where you need it. Select the PDF page and set the x and y coordinates to precisely position your new content using standard PDF units and the native PDF coordinate system. With exactly 72 PDF units per inch, you can easily fine-tune your placement.

Add to PDF supports a wide range of the most common graphic image formats with high-quality preservation of color accuracy and resolution:

  • JPEG (.jpg, .jpeg)
  • TIF (.tif, .tiff)
  • PNG (.png)
  • GIF (.gif)

Support Variable Data Printing

Quickly and easily create custom PDFs ready to print uniquely for each customer, user, or recipient of your document.  Automate and streamline your workflow for adding variable data to template PDFs, including personalized logos, photos, and user information.  Add to PDF "stamps" content right where you need it without modifying the underlying content of the PDF.  Whether you need to add your customers' business logos to their invoices or addresses onto envelopes, the Add to PDF API Tool makes it easy.

Attach Any File

With the Add to PDF API Tool you can easily add any file as an attachment to a PDF. There are many reasons why you may need to attach files to a PDF, including providing supplementary information, facilitating collaboration, preserving backups.

Many e-invoicing standards from around the world have requirements for specific file formats to be attached to PDF documents. For example, ZUGFeRD is a German standard for e-invoicing based on the PDF/A-3 format with attached XML files. Simalarly, the Saudi Arabia FATOORAH standard also requires XML files to be attached to PDF/A-3 documents.

Start from Code Examples
  1. First, you'll need an API Key - to:
    • Stay anonymous with a Guest API Key for 10 free API Calls
    • Sign up for an upgraded API Key with unlimited, continuous service
  2. Choose your programming language
  3. Copy and paste the code to your project
  4. Update Api-Key field with your unique API Key
  5. Update file with the local path to your input
  6. Run this code to send an API Call
See more code examples in our
GitHub repository
Try pdfRest with just a few clicks
Download our Postman Postman Collection
curl -X POST "https://api.pdfrest.com/pdf-with-added-image" \
  -H "Accept: application/json" \
  -H "Content-Type: multipart/form-data" \
  -H "Api-Key: xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
  -F "file=@../Sample_Input/ducky.pdf" \
  -F "image_file=@../Sample_Input/strawberries.jpg" \
  -F "output=example_out" \
  -F "x=10" \
  -F "y=10" \
  -F "page=1"
Customize Your Solution
Image File
Compatible with the /pdf-with-added-image endpoint.

The image_file parameter allows you to select a local image to be uploaded to pdfRest’s processing server.

The following file formats are accepted:
  • .gif
  • .jpg/.jpeg
  • .png
  • .tif/.tiff
Generate a self-service API Key now!

Create your FREE API Key to start processing PDFs in seconds, only possible with pdfRest.

Compare Plans
Contact Us