I'm trying to edit the accessibility tagging of an existing pdf using the examples in https://help.syncfusion.com/file-formats/pdf/working-with-tagged-pdf, but the document's tags don't seem to change. I can add elements to the pdf's content, but nothing changes in the tag tree when viewing in Adobe Acrobat.
Am I missing something here, or is this not possible? I know you can create a new tagged PDF, but not edit one?
Thank you,
My code:
PdfLoadedDocument document = new PdfLoadedDocument(fileName);
PdfStructureElement rootElement = document.StructureElement;
rootElement.TagType = PdfTagType.HeadingLevel1;
foreach (var child1 in rootElement.ChildElements)
{
child1.TagType = PdfTagType.HeadingLevel1;
child1.AlternateText = "test";
child1.ActualText = "test";
}
document.Save(newFileName);
document.Close(true);