PDF Editing Issues

How to Mail Merge Photos into an Acrobat PDF Form Using Excel Data

Aamir Naveed AkramAamir Naveed Akram Oct 28, 2026 869 views

Question details

The user needs to insert uniquely named images into a fillable Acrobat PDF form based on records and file paths generated from an Excel spreadsheet.

How to Mail Merge Photos into an Acrobat PDF Form Using Excel Data
Product
Adobe Acrobat and Spreadsheet applications
Device & OS
not provided
Scenario
Batch inserting or mail merging multiple unique photos into specific PDF form fields.
Observed behavior
Acrobat lacks a native image mail-merge feature, requiring manual workarounds using JavaScript and spreadsheet formulas to generate accurate local file paths.
Before you start

Ensure all your image files (such as .tif, .jpg, or .png) are stored in a single local directory, and have your spreadsheet containing the corresponding file names open.

Solution 1Recommended

Use Acrobat JavaScript to Import Images into Button Fields

Since Acrobat lacks a native photo mail merge feature, you can configure button fields and use a custom JavaScript script to pull and display images based on generated paths.

Acrobat does not provide a standard mail-merge feature for importing images directly into form fields. To achieve this automated workflow, you must rely on custom scripting and adapt button fields to act as image placeholders.

1
Prepare the PDF form

Open your fillable PDF in Adobe Acrobat and enter Form Editing mode.

2
Create a Button field

Add a new Button field in the exact location where you want the photo to appear.

3
Configure button properties

Right-click the Button, select Properties, navigate to the Options tab, and set the Layout to display 'Icon only'.

4
Apply JavaScript

Use Acrobat's JavaScript console to write a custom script that reads the image file path from your data source and imports the specified file as the button's icon.

Use Acrobat JavaScript to Import Images into Button Fields
Comprehensive PDF & Spreadsheet Solution

Seamlessly Manage Spreadsheet Data and PDFs with WPS Office

WPS Office provides a powerful Spreadsheet application that perfectly executes complex path-generation formulas, alongside a built-in PDF editor. Easily prepare your image data and manage your PDF forms within one integrated suite.

  1. 1. Open your data in WPS Spreadsheet: Launch WPS Spreadsheet and paste your raw list of image file names.
  2. 2. Generate batch file paths: Use the built-in HYPERLINK and concatenation formulas to automatically generate local file paths for all your photos.
  3. 3. Save with perfect compatibility: Save your completed spreadsheet in .xlsx format to ensure seamless integration with your PDF scripts.
  4. 4. Review your form in WPS PDF: Open your target PDF form in WPS PDF to verify the layout and field placements before running your batch image import.
Fully compatible with Microsoft Excel (.xlsx) formulas, including HYPERLINK and text concatenationBuilt-in PDF editor for managing form fields, text, and page layoutsLightweight, all-in-one suite for processing documents, spreadsheets, and PDFs simultaneouslyFree to download with a familiar, easy-to-use interface
microsoft office alternative - wps office

Frequently Asked Questions

Can I natively mail merge images in Adobe Acrobat like I do in Microsoft Word?

No, Adobe Acrobat does not feature a native mail merge tool specifically for image fields. You must use JavaScript workarounds with button fields or rely on third-party PDF plug-ins to batch import photos.

Why use a Button field instead of an Image field in Acrobat for scripting?

Button fields in Acrobat can be easily configured via JavaScript to dynamically change their icon to a local image file. Standard image fields are often strictly interactive for manual user input and are much harder to automate via batch scripts.

How do I fix broken local hyperlinks in my spreadsheet?

Double-check your path syntax. Local file links typically require the 'file:///' prefix followed by the exact drive letter and folder structure (e.g., 'file:///C:\Photos\image.tif'). Ensure no spaces or slashes are accidentally omitted in your formula.

Can WPS Office handle Excel's HYPERLINK formulas for local files?

Yes, WPS Spreadsheet is highly compatible with standard Microsoft Excel formulas. You can seamlessly create, edit, and click local file hyperlinks directly within WPS Spreadsheet to organize your data.