Add page content with JS and retain tags
I'm trying to accomplish a few things. Is this possible?
Current state: Multiple page PDF with tables and form fields in some cells. Table structure is the same across all tables (same number of columns, varying number of rows). All content has been structured appropriately in teh Tags pane.
What is desired:
- Based on a result in a form field (e.g., Failed) from potentially multiple rows in multiple tables, I need a new page to be inserted, a table structure created (using the same row of table headers that is on all the tables) and add the complete row of information for any row that had a result of "Failed".
- It is likely that only so many rows could fit on a page, let's say 7. So, I need it to add as many pages with the table structure and header row as necessary to add all data rows that have a result of "Failed".
- Based on numbers I provide in a hidden field for each data row, I want the data rows on these new page(s) to appear in decsending order. E.g. a row has a result of "Failed" and an associated score of "7". Another data row has a result of "Failed" and a score of "6".
- The new pages and content must become tagged in the Tags pane. Thus, I can't use layers because they are not accessible in the Tags pane.
I created "Templates" and made them invisible for a couple pages hoping that may be a way to maintain tags. If using "Templates" is a good approach (not a better/easier way to accomplish the above bullets), is there a way to indicate in the JS how to insert the data row content into the existing template table structure?
Thanks! Stretching the limits of PDFs, but is the only resource available to all recipents.
