jpsnow72
jpsnow72

Reputation: 995

Using JavaScript with Adobe PDF Action Wizard to modify tags

I am attempting to modify some tags in a PDF document by using the Action Wizard and creating a new JavaScript action.

My eventual goal is to find all tables and keep the inner tags, but remove the table tags (table, tr, td).

I am not sure if it is even possible to do this or not.

For now, just to test to see if I could find all of the table tags (and get the number), I tried this, but it isn't working:

var tables = app.document.getElementsByTagName('table');
var numTables = tables.length;
app.alert(numTables);

If this isn't possible, do you have any other suggestions to modify the tags in a PDF document?

Upvotes: 0

Views: 586

Answers (1)

joelgeraci
joelgeraci

Reputation: 4937

It's not possible using JavaScript. The Acrobat JavaScript API does not have access to the structure tags in a PDF.

Upvotes: 1

Related Questions