PDF Editing Issues

How to Fix JavaScript mailDoc Not Working in Acrobat Reader for Android

Nimra MalikNimra Malik Oct 27, 2026 869 views

Question details

The user is attempting to use a JavaScript mailDoc function to lock form fields and automatically attach the PDF to an email, but the email attachment action fails on mobile.

Fixing JavaScript PDF Email Attachments in Acrobat Reader for Android
Product
Adobe Acrobat Reader
Device & OS
Android
Scenario
Running an embedded PDF script designed to finalize a filled form by locking its fields and triggering the device's default email application to send the document.
Observed behavior
While the form fields lock successfully, the mailDoc command is ignored, and the PDF does not attach to an email in the Android version of the app.
Before you start

Ensure your default Android email client is fully configured and verify that you have saved a local copy of your filled PDF form before attempting to share it.

Solution 1Recommended

Use the Native Android Share Menu

Bypass the unsupported JavaScript mailDoc function by manually sharing the locked PDF using Android's built-in sharing capabilities.

Adobe Acrobat Reader for mobile has a restricted set of supported JavaScript APIs for security and architectural reasons. Consequently, system-level commands like mailDoc will not execute on Android.

To achieve the same goal, you can trigger the script to lock your fields, save the document, and manually share it.

1
Trigger the field-locking script

Tap the button or execute the action in your PDF that triggers the field-locking JavaScript. Confirm the fields are locked.

2
Save the document

Tap the three-dot menu at the top right and select 'Save a Copy' to ensure your locked fields are permanently stored.

3
Share via Email

Tap the 'Share' icon in the top menu, select 'Send a Copy', and choose your preferred email application from the Android share sheet.

Use the Native Android Share Menu
Mobile Limitations: Automated email drafting via PDF JavaScript is exclusively supported on desktop PDF applications.
Efficient PDF Form Management

Fill and Share PDF Forms Easily with WPS Office

Avoid complex JavaScript compatibility issues on mobile devices. WPS Office provides intuitive built-in tools to seamlessly fill, manage, and share PDF forms directly from your Android device without relying on scripts.

  1. 1. Open your PDF form: Launch WPS Office on your Android device and open the PDF form you need to complete.
  2. 2. Fill out the fields: Tap the interactive form fields to input your text, or use the 'Fill & Sign' tools to add signatures.
  3. 3. Access the Share menu: Tap the 'Tools' icon at the bottom of the screen, navigate to the 'File' tab, and select 'Share'.
  4. 4. Send via Email: Choose 'Email' from the available options to automatically attach the completed PDF form to a new message in your default mail app.
Easily fill and navigate complex PDF forms directly on your mobile device.Share PDFs instantly via email with a single tap, bypassing unsupported mobile JavaScript functions.Highly compatible with standard Adobe PDF formats and fully supports Microsoft Office document formats.Lightweight, battery-efficient application optimized for all modern Android devices.
microsoft office alternative - wps office

Frequently Asked Questions

Why do some JavaScript actions work in mobile PDF readers while others fail?

Mobile PDF applications only support a limited subset of the JavaScript API. Basic field formatting and calculation scripts often work, but actions that require system-level access, such as printing or interacting with an email client (mailDoc), are restricted due to mobile operating system security models.

Is there any PDF app on Android that supports the JavaScript mailDoc function?

Currently, no major Android PDF reader fully supports the mailDoc JavaScript function. Mobile platforms heavily sandbox applications, preventing them from silently passing attachments to other apps via legacy scripting methods.

Can I lock PDF form fields on mobile without using JavaScript?

Yes. Many mobile PDF editors allow you to flatten a document. Flattening removes the interactive form fields and permanently merges your inputted text into the document's background, effectively 'locking' the data before you email it.