Other PDF Issues

How to Create Bold Text in an Acrobat JavaScript Email

Ayan MasoodAyan Masood Nov 5, 2026 869 views

Question details

The user wants to format selected words in the body of an automated email generated via Acrobat JavaScript to appear in bold.

How to Create Bold Text in an Acrobat JavaScript Email
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Generating automated emails from a PDF document using JavaScript and attempting to apply rich-text formatting to the message body.
Observed behavior
The standard JavaScript method in Acrobat is generating plain-text emails, and the user needs a way to apply bold text formatting.
Before you start

Determine whether your workflow strictly requires the email body itself to be formatted, or if attaching a fully formatted PDF document to a standard plain-text email will suffice.

Solution 1Recommended

Use an External Mail System for HTML Emails

Since standard Acrobat JavaScript functions only output plain text, you must use an external server-side script to send formatted HTML emails.

The built-in mailDoc and app.mailMsg methods in Acrobat JavaScript are specifically designed to generate plain-text emails. They do not support rich-text formatting, meaning you cannot use bold text, italics, custom fonts, or colors directly through the Acrobat API.

To bypass this limitation and send formatted content, you need to configure your PDF form to submit data to an external server-side script (such as PHP or Node.js) that is capable of constructing and sending an HTML-formatted email.

1
Acknowledge the plain-text limitation

Understand that adding HTML tags like <b> or <strong> directly into Acrobat's mailDoc method will not work; the tags will simply appear as raw text in the recipient's email.

2
Set up a server-side script

Create a script on your web server (using PHP, Python, etc.) that accepts form data and uses a mailing library to send an HTML-formatted email.

3
Configure PDF to submit data

Use Acrobat's submitForm() JavaScript method inside your PDF to send the required form field data to your external server URL instead of generating the email locally.

4
Generate the styled email

Have your server-side script parse the incoming PDF data, construct an HTML email body with the necessary bold styling, and dispatch it to the recipient.

Use an External Mail System for HTML Emails
Security and Support Restrictions: External scripts and HTML emails are subject to network security restrictions and varying levels of HTML support across different email clients.
Easily Edit and Share PDFs

Format and Share Documents Directly with WPS Office

While automated email formatting via PDF JavaScript can be restricted and overly complex, WPS Office provides a powerful built-in PDF editor. You can easily apply bold formatting directly within your document and seamlessly share it as an attachment without worrying about plain-text email limitations.

  1. 1. Download WPS Office: Install the free version of WPS Office from the official website.
  2. 2. Open your PDF: Launch WPS PDF and open the document you wish to format.
  3. 3. Format your document: Navigate to the Edit tab to apply bold styling and other formatting directly to your PDF content.
  4. 4. Share via email: Click the 'Share' or 'Email' button to attach your beautifully formatted PDF to an email, bypassing plain-text body limitations.
Directly edit and format text within your PDFs, including bold, italics, and custom fonts.Share documents easily as attachments via your default email client with a single click.Fully compatible with standard PDF formats and Adobe Acrobat files.Lightweight software with an intuitive, user-friendly interface for effortless document management.
microsoft office alternative - wps office

Frequently Asked Questions

Can I use HTML tags inside Acrobat JavaScript's mailDoc method?

No, the mailDoc method only interprets plain text. If you include HTML tags like <b> or <i>, they will not render as formatting and will be displayed as raw text in the final email body.

Does the app.mailMsg method support rich text?

Just like the mailDoc method, app.mailMsg is restricted to plain text. It cannot apply bold formatting, hyperlinks, or other rich-text styles to the email message.

Are there any Acrobat plugins to enable rich text in automated emails?

Acrobat itself does not natively support rich-text email generation via JavaScript plugins. For formatted emails, you must rely on external server-side processing or dedicated third-party email APIs.