Other PDF Issues

How to Fix Acrobat JavaScript Email Buttons Not Working

John WilsonJohn Wilson Nov 5, 2026 869 views

Question details

Users are unable to trigger the JavaScript email button (mailDoc) within a PDF file to send the document.

How to Fix Acrobat JavaScript Email Buttons That Do Nothing
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Attempting to click an embedded JavaScript email button to generate an email with the PDF attached.
Observed behavior
The button works on some devices using Acrobat Pro but does nothing on others when opened in Adobe Reader, web browsers, or due to permission and security differences.
Before you start

Ensure you have a default desktop email client (such as Outlook or Apple Mail) installed and properly configured on your computer, as web-based email services generally cannot be triggered by the PDF mailDoc function.

Solution 1Recommended

Ensure the PDF is Opened in a Desktop PDF Application

Web browsers and unsupported third-party PDF viewers often block or do not support Adobe's JavaScript APIs like mailDoc.

Many modern web browsers have built-in PDF viewers that strip out interactive JavaScript for security and performance reasons. To use mailDoc features, the document must be opened in a dedicated desktop application.

1
Download the file

Download the PDF to your local hard drive instead of viewing it directly in a web browser window.

2
Open with desktop app

Right-click the downloaded PDF file, select 'Open with', and choose Adobe Acrobat Pro, Adobe Acrobat Reader, or another fully featured desktop PDF reader.

3
Test the button

Click the email button again to verify if the local application correctly processes the script and opens your email client.

Ensure the PDF is Opened in a Desktop PDF Application
Browser Limitations: Chrome, Edge, and Firefox use their own PDF rendering engines which inherently do not support Acrobat-specific JavaScript actions.
Easy PDF Sharing with WPS Office

Share PDFs via Email Instantly with WPS Office

If complex JavaScript buttons are causing compatibility issues across different devices, WPS Office offers a built-in, seamless way to share PDF forms and documents directly via email without relying on vulnerable scripts.

  1. 1. Open your PDF: Launch WPS Office and open the PDF document you wish to share.
  2. 2. Access the Share menu: Click on the 'Share' button located in the top-right corner of the toolbar.
  3. 3. Select Email: Choose the 'Email' option from the sharing dropdown list.
  4. 4. Send the document: WPS Office will automatically open your default desktop email client and attach the PDF, ready for you to send.
Built-in direct email sharing feature without needing JavaScriptHighly compatible with Adobe PDF forms and formattingLightweight, fast, and free to useCross-platform support for Windows, Mac, and mobile devices
microsoft office alternative - wps office

Frequently Asked Questions

Why does the mailDoc button work in Acrobat Pro but not in Adobe Reader?

Adobe Reader has stricter security sandboxing and feature limitations compared to Acrobat Pro. If the PDF lacks extended usage rights or if security settings in Reader restrict executable scripts, the JavaScript button will be blocked from triggering the email client.

Can I use webmail like Gmail or Yahoo with PDF email buttons?

Generally, PDF JavaScript email buttons require a locally installed desktop email client like Microsoft Outlook or Apple Mail to function. They cannot directly interface with browser-based webmail without specialized third-party configuration or bridging tools.

Is it safe to enable JavaScript in my PDF viewer?

While enabling JavaScript allows interactive features like forms and buttons to work normally, it can also pose security risks if you open malicious files. It is recommended to only enable JavaScript when opening trusted documents from known sources.