Can Adobe Acrobat JavaScript Add Tags to the PDF Tag Tree?
Question details
Determine whether Acrobat JavaScript can create arbitrary structural tags in a PDF and find another way to tag the document.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- A user wants to add structural elements, such as paragraph tags, to a PDF tag tree through Acrobat JavaScript.
- Observed behavior
- Standard Acrobat JavaScript does not provide a method for creating arbitrary structural tags in the PDF tag tree.
Open the PDF in Adobe Acrobat and check whether the accessibility tagging tools are available in your edition. Menu names and locations may vary by Acrobat version.
Use Acrobat’s accessibility tools to tag the PDF
Use automatic tagging to create an initial structure, then review and correct the tag tree manually.
Automatic tagging can provide a starting point, but it may not correctly identify every heading, paragraph, table, or reading order. Creating a tag alone does not necessarily associate it with the intended page content.
Open the PDF in Acrobat, then choose All tools > Prepare for accessibility. In older versions, look under Tools > Accessibility.
Select Automatically tag document or Autotag Document to generate a tag structure for an untagged PDF.
Open the Tags panel from the navigation panels. Expand the tree and inspect the tag types, hierarchy, and reading order against the page content.
Use the Tags panel’s context menu to edit or add tags where needed. Check that each tag is associated with the correct page content, not just present in the tree.
Run the Accessibility Check from the accessibility tools and review the results, including items that require manual verification.

Work with PDFs and Office files in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for working across documents, spreadsheets, presentations, and PDFs. Its Office format compatibility helps make migration easier, but it does not fix Acrobat JavaScript or replace a specialized PDF accessibility tagging workflow.

Frequently Asked Questions
Can Acrobat JavaScript create a paragraph tag in the PDF tag tree?
Standard Acrobat JavaScript does not provide a method for creating arbitrary structural tags, including paragraph tags. Use Acrobat’s accessibility tools or a specialized PDF processing tool instead.
Where can I automatically tag a PDF in Acrobat?
Open the PDF and choose All tools > Prepare for accessibility, then select Automatically tag document. In older versions, look for Autotag Document under Tools > Accessibility.
Does automatically tagging a PDF make it accessible?
Not necessarily. Review the Tags panel for correct tag types, hierarchy, content associations, and reading order, then run Acrobat’s Accessibility Check and complete the manual checks.
What can I use for automated PDF tagging beyond Acrobat JavaScript?
Consider a specialized PDF accessibility or document-processing tool that supports creating and modifying structure tags. Check its documentation for the tag types and automation features you need.




