Skip to main content
Known Participant
September 10, 2025
Question

How to create persistent, programmatically-controlled content tags in PDF in Adobe Reader/Pro

  • September 10, 2025
  • 1 reply
  • 563 views
 
What I'm trying to achieve:
  • Tag user-selected text in PDFs with unique IDs
  • Navigate to any tag programmatically using its ID
  • Extract the text content within tag boundaries
  • Prevent users from easily deleting tags through Acrobat's UI
  • Send/receive tag data to/from an external server using API's
  • Preferably integrate it with a react app

Specific questions:

Is there a way to create truly hidden markers/tags in PDFs that are only accessible via API but invisible to users in all Acrobat panels? Can PDF Structure Tags be manipulated via JavaScript, or do they require C++ SDK? If JavaScript supports them, how? What's the recommended approach for integrating a React UI within an Acrobat plugin? Is CEF (Chromium Embedded Framework) the only option? How can I protect annotations/tags from user deletion while maintaining programmatic access? Is there an event I can intercept?

Environment:

Adobe Acrobat Pro DC (2021 or later) Acrobat JavaScript API (preferred) or C++ SDK if necessary

Currently the best option I could find is PDF embed API and in that using annotations. Any guidance on the best approach or alternative PDF objects I should consider?

1 reply

Known Participant
September 11, 2025

Hi guys I believe the above question is too broad let me narrow it down a bit-
I need to create a tagging system for PDFs with these requirements:

  • Tag user-selected text with unique IDs that I can navigate to programmatically
  • Extract the text content within each tag's boundaries
  • Make tags resistant to user deletion (hidden from Acrobat's UI panels if possible, this is a preference not a requirement), if this is not possible it would be fine even if I am able to detect the event of deletion of said tag.
  • Send/receive tag data with my server via APIs
  • PDF should be able to support 2000+ tags without it affecting the performance of Adobe application too much.

I've been exploring different PDF objects for this and I'm torn between using annotations, structure tags, or maybe custom metadata. My research suggests annotations might work but they're visible to users and easily deletable. Structure tags seem more robust but I'm not sure if JavaScript can manipulate them or if I need the C++ SDK.

I'm wondering if there's a better PDF object type for this use case? Maybe something like custom XMP metadata, form fields, or embedded files that could act as hidden markers?

What would be the most reliable PDF object to use for creating persistent, programmatically accessible tags that users can't easily mess with in Acrobat Pro?
I'm new to acrobat and would really appreaciate the help, thanks!

S_S
Community Manager
Community Manager
September 11, 2025

Hi @adhirath_7243,

 

Hope you are doing well. Thanks for writing in!

 

Based on the description, the requirements cross three different capability domains of the PDF platform:

  • the PDF / Tagged-structure model (structure tree/tags),

  • the annotation/form model (visible/invisible annotations and fields) that Acrobat JavaScript can manipulate, and

  • the host/extension layer (how you integrate a React UI and how to stop users from removing tags).

Here are my pointers along with their reference links:

 

Truly hidden, API-only tags that are invisible in all Acrobat panels: not possible purely with Acrobat UI/JS. You can hide things from the page view, but Acrobat’s accessibility/tags/comments panels can still expose structure or annotations unless you use lower-level manipulations (PDF objects/XMP) via the Acrobat SDK or Adobe PDF Library (C/C++) — i.e., you need a plug-in or server-side PDF library to make tags that Acrobat’s UI won’t surface.

Reference: https://adobe.ly/4mexaZH

 

Can PDF Structure Tags be manipulated via Acrobat JavaScript? No — Acrobat JavaScript does not provide direct APIs to walk/modify the PDF structure tree (accessibility tag tree). To programmatically read/write the structure tree, you must use the Acrobat (C++) plug-in API or the Adobe PDF Library / Acrobat SDK.

Reference: https://adobe.ly/3VNU5Ag

 

Can JavaScript manipulate annotations/fields? Yes — Acrobat JavaScript supports creating, naming, and changing many annotation and form-field properties (including flags such as ReadOnly/Hidden/Locked). Use this for tag-like markers that are visible as annotations/fields.

Reference: https://adobe.ly/3VNU5Ag

 

React UI integration in Acrobat: Acrobat does not support UXP/CEP like Photoshop/InDesign. For deep integration, you’ll normally write an Acrobat C++ plug-in (Acrobat SDK) and either (a) host a Chromium/CEF view inside that plug-in to render a React UI, or (b) implement an external React app that communicates with Acrobat via Inter-Application Communication (IAC) / a local HTTP endpoint. CEF is the common approach, but requires native plug-in work.

Reference: https://adobe.ly/4m7cMtx

 

While I might not be the best person to share a solution due to my limited knowledge of scripting, the above details might give you clarity about the approach you can take.


Regards,
Souvik.

Known Participant
September 11, 2025

Souvik, bless you man! This was super helpful !!! I do have some follow up questions though.

I'm trying to create a tool/plugin for Adobe Acrobat Pro that can add accessibility tags to selected text through a custom toolbar button. The catch is I need this to work across any PDF without embedding scripts in each document - basically like a plugin that's installed once and available for all PDFs I open(I don't know if JS can be used like that).

The tool also needs to communicate with my server through CRUD APIs to sync tagging rules and definitions. I want to distribute this to multiple clients, so it needs to be easily installable on their machines.

My main questions are: Can I achieve this with JavaScript (like folder-level scripts or Action Wizards), or do I need to build a proper C++ plugin using the Acrobat SDK? Is it even possible for JavaScript in Acrobat to make external API calls reliably? 

I'm essentially building an accessibility tool that standardizes how structure tags are applied across an organization while supporting API communication from a central server. And I also need some real estate to display a tree structure I have in my react app. I hope this makes sense.