Auto-Tag doesn't modify the bookmarks at all.
You'll have to post-process the PDF using a PDF library tool like PDFBox.
While PDFBox doesn't have a direct "create bookmarks from tags" function that automatically maps specific tag types (like headings) to bookmarks, you can programmatically achieve this by
Extracting the Tagged Content: You can use the PDFMarkedContentExtractor class in PDFBox to extract the tagged content from a PDF document. You'll iterate through the pages, process each page with the extractor, and then retrieve the marked content list, which will contain information about the tags and their associated text content.
Identifying the Relevant Tags and Text: After extraction, you'll need to examine the extracted PDMarkedContent objects and identify the tags that should correspond to your desired bookmark hierarchy (e.g., <H1> for top-level bookmarks, <H2> for sub-bookmarks, etc.).
Creating the Bookmark Outline: You can then use the PDDocumentOutline and PDOutlineItem classes in PDFBox to build the bookmark structure (also called the document outline) based on the identified tags and their corresponding text. You'll specify the title of each bookmark (typically extracted from the tag's content) and the page it should link to.
... View more