PDF Conversion Issues

Automate PDF Image Export, TIFF Conversion, and OCR via JavaScript

Nimra MalikNimra Malik Nov 3, 2026 869 views

Question details

The user is looking to automate the process of exporting images from PDFs, converting PDF pages to TIFF files, and executing OCR to create text files across multiple folders using JavaScript.

Product
Adobe Acrobat
Device & OS
not provided
Scenario
Setting up automated batch workflows to extract images, convert PDF documents into TIFF formats, and perform optical character recognition (OCR) on files distributed across various directories.
Observed behavior
Acrobat JavaScript enforces strict security limitations, preventing scripts from having unrestricted folder access and restricting the direct automation of batch OCR and TIFF exports without external tools.
Before you start

Verify that you have administrative permissions and unrestricted folder access, as script-based automation requires specific security rights to read and write files in multiple directories.

Solution 1Recommended

Use Action Wizard for Batch PDF Automation

Because Acrobat JavaScript restricts background folder access for security reasons, using the Action Wizard is the recommended approach for sequencing batch PDF conversions and OCR tasks.

Acrobat's security model restricts silent JavaScript execution across local directories to prevent malicious behavior. Instead of writing custom scripts for multi-folder operations, the built-in Action Wizard bypasses these security limits safely.

You can create a custom action that sequences image extraction, TIFF saving, and text recognition seamlessly.

1
Open the Action Wizard

Launch Adobe Acrobat Pro, go to 'Tools', and select 'Action Wizard'.

2
Create a New Action

Click 'New Action' from the top toolbar to open the workflow sequence builder.

3
Add OCR and Save Steps

Under 'Recognize Text', add the OCR tool to your action steps. Then, under 'Save & Export', add 'Save' and click the settings gear to specify TIFF or Text format outputs.

4
Specify Target Folders

In the 'Files to be Processed' section on the right, click 'Add Folder' to select the multiple directories you want the automation to process, and then save the action.

Use Action Wizard for Batch PDF Automation
Automation Complete: Once saved, you can run this Action at any time to automatically perform OCR and export TIFFs without encountering JavaScript security pop-ups.
Efficient PDF Conversion and OCR Alternative

Batch Convert PDFs to Images and OCR Text with WPS PDF

Avoid complex JavaScript coding and security permission configurations. WPS PDF offers user-friendly, built-in batch processing tools for converting PDFs to high-quality images and extracting text via OCR.

  1. 1. Open Your Document: Launch WPS Office and open the PDF file you need to process.
  2. 2. Access Conversion Tools: Navigate to the 'Tools' tab on the top ribbon and select 'PDF to Picture'.
  3. 3. Configure Output Settings: Choose your desired image format (such as TIFF, JPG, or PNG), set the export quality, and select your destination folder.
  4. 4. Extract Text using OCR: To generate a text file, click on the 'OCR' button located in the 'Tools' tab, select the document language, and click 'Extract Text'.
  5. 5. Save the Output: Review the recognized text in the OCR window and save it directly as a Word document or a plain text file.
Built-in 'PDF to Picture' tool for rapid bulk conversionHighly accurate OCR engine for seamless text extractionNo programming or security bypass configuration requiredFully compatible with all standard Microsoft Office and PDF document formats
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Acrobat JavaScript fail to save files to another folder?

Acrobat's security model restricts scripts from silently saving files to local directories to prevent malicious behavior. Without configuring trusted functions in a folder-level script, standard document-level JavaScript cannot bypass these security restrictions.

Can I batch convert PDFs to TIFF without writing scripts?

Yes. Most professional PDF editors, including Acrobat Pro's Action Wizard and WPS PDF's built-in conversion tools, offer batch processing features that allow you to output multiple PDFs to TIFF format automatically without writing any code.

Is it possible to trigger OCR silently using JavaScript?

Directly triggering OCR via generic JavaScript is heavily restricted due to security and UI requirements. You usually need to rely on the Action Wizard sequence or use external automation utilities to run an OCR process across multiple files.

What are trusted functions in PDF JavaScript?

Trusted functions are special JavaScript routines defined in a folder-level configuration file that run with elevated privileges. They allow you to execute methods like saving files or accessing local paths that are normally blocked in standard document scripts.