How to Mail Merge Photos into an Acrobat PDF Form Using Excel Data
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.

- 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.
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.
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.
Open your fillable PDF in Adobe Acrobat and enter Form Editing mode.
Add a new Button field in the exact location where you want the photo to appear.
Right-click the Button, select Properties, navigate to the Options tab, and set the Layout to display 'Icon only'.
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.

Generate Image File Paths and Hyperlinks Using Spreadsheet Formulas
Use spreadsheet formulas to automate the creation of local file paths and clickable hyperlinks for thousands of photos, which can then be fed into your PDF script.
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. Open your data in WPS Spreadsheet: Launch WPS Spreadsheet and paste your raw list of image file names.
- 2. Generate batch file paths: Use the built-in HYPERLINK and concatenation formulas to automatically generate local file paths for all your photos.
- 3. Save with perfect compatibility: Save your completed spreadsheet in .xlsx format to ensure seamless integration with your PDF scripts.
- 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.

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.




