How to Fix JavaScript mailDoc Not Working in Acrobat Reader for Android
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.

- 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.
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.
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.
Tap the button or execute the action in your PDF that triggers the field-locking JavaScript. Confirm the fields are locked.
Tap the three-dot menu at the top right and select 'Save a Copy' to ensure your locked fields are permanently stored.
Tap the 'Share' icon in the top menu, select 'Send a Copy', and choose your preferred email application from the Android share sheet.

Execute the Workflow on a Desktop Computer
Transfer the document to a Windows or Mac environment where full Adobe Acrobat JavaScript form APIs are fully supported.
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. Open your PDF form: Launch WPS Office on your Android device and open the PDF form you need to complete.
- 2. Fill out the fields: Tap the interactive form fields to input your text, or use the 'Fill & Sign' tools to add signatures.
- 3. Access the Share menu: Tap the 'Tools' icon at the bottom of the screen, navigate to the 'File' tab, and select 'Share'.
- 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.

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.




