How to Create Multiple PDF Form Pages from a Folder of Images
Question details
The user needs to generate about 90 identical PDF pages, where each page contains an imported image from a specific folder and a descriptive text field.

- Product
- PDF Editor
- Device & OS
- not provided
- Scenario
- Automating the creation of a multi-page PDF document from a folder of images, ensuring each page acts as a form with a designated image field and a corresponding text field.
- Observed behavior
- Standard PDF editors typically only import one image at a time into form fields, making manual bulk creation tedious.
Ensure all the images you want to import are organized within a single folder on your computer, and verify that you have access to a PDF editor capable of running advanced JavaScript.
Use Custom JavaScript and a PDF Template
Automate the duplication process by converting your base page into a PDF template and running a custom script to populate the form fields.
This method requires a PDF application that supports advanced scripting and custom templates, such as Adobe Acrobat. You will need basic familiarity with JavaScript to execute the process successfully.
Set up a single PDF page containing one image field and one text field. Format them as required, then save this specific page as a hidden PDF template.
Access your PDF editor's developer or scripting tools and open the JavaScript console to input your custom automation script.
Write a script that loops through your desired number of pages (e.g., 90 times). The script should command the software to spawn a new copy of the template for each iteration.
Within the loop, use the buttonImportIcon method targeting the newly created image field (ensuring you use dynamic, sequential field naming) to automatically pull the respective image from your target folder.

Batch Convert Images to PDF with WPS Office
If you want to avoid writing complex JavaScript code, WPS Office offers a quick and user-friendly way to merge a folder of images into a multi-page PDF. Once combined, you can easily insert text fields onto each page.
- 1. Launch WPS Office: Open WPS Office and navigate to the 'PDF' section from the main workspace.
- 2. Use the Picture to PDF tool: Click on 'Picture to PDF' in the tools menu. Select all the images from your folder and choose to merge them into a single PDF document.
- 3. Add descriptive text fields: Once the PDF is generated, go to the 'Edit' tab. Select 'Add Text' to place a description field underneath the image on each newly created page.

Frequently Asked Questions
Can I batch import multiple images into standard PDF form fields without using a script?
No, most standard PDF editing software cannot natively map a folder of images to sequential form fields automatically. You must either use a custom JavaScript or use a 'Picture to PDF' batch converter to create standard pages first.
What is the buttonImportIcon method in PDF forms?
The buttonImportIcon is a specific JavaScript method used in advanced PDF editing environments. It prompts the application to import an external image file to act as the visual icon for a designated button or image field.
Does WPS Office support creating fillable PDF forms?
Yes, WPS Office supports form creation and editing. You can insert interactive text fields, checkboxes, and buttons into your documents using the 'Form' tab available in the Premium version.




