We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Tags in PDF

Can you please help me with api that create tags PDF file using aspose pdf java or .net. or convert pdf to tagged pdf. When I convert docx to pdf using PdfSaveOptions:ExportDocumentStructure, generated pdf has tags.

TEST: (attaching all the pdfs for reference)

Removed tags from pdf (TestWithTags.pdf (81.0 KB)
TestWithTags.pdf) and created new pdf file manually(TestWithOutTags.pdf (31.2 KB)
TestWithOutTags.pdf). I tried creating tags using aspose pdf using below code. Generated pdf (GenratedFromAsposeCode.pdf (26.6 KB)
GenratedFromAsposeCode.pdf) does not have tags.

com.aspose.pdf.Document doc = new com.aspose.pdf.Document(“TestWithOutTags.pdf”);
doc.convert(new ByteArrayOutputStream(), com.aspose.pdf.PdfFormat.PDF_A_1A, com.aspose.pdf.ConvertErrorAction.None);
doc.save(“GenratedFromAsposeCode.pdf”);

I am not looking for soution where we need to create tag for each entry while creation of pdf.like TaggedPdfTextElement textElement1 = new TaggedPdfTextElement(doc, “P”, “text”, ts);

Kindly help.Thank you.

@vijji

Thank you for contacting support.

Would you please clarify if you are referring to TaggedPDF because mentioned file GenratedFromAsposeCode.pdf contains tags. Moreover, an investigation ticket with ID PDFJAVA-38242 has been logged in our issue management system for conversion of non tagged PDF document to a tagged document without creating tagged text element one after another. We will let you know as soon as some significant updates will be available in this regard.

GeneratedFromAsposeCode.pdf does not have tags info. Code is just created root element tag. Expected tags are similar to TestWithTags.pdf.

Also can you please help with creating tagged element for footnotes like blow code example for taggedtext and tagged image. Attaching the document for footnote tag refrence. footnoteleft.pdf (52.1 KB)

TaggedPdfTextElement textElement1 = new TaggedPdfTextElement(doc, “P”,“text”,ts);
TaggedPdfFigureElement figureElement = new TaggedPdfFigureElement(doc,image, BBox);

Thank you.

@vijji

We can see the tags in GeneratedFromAsposeCode.pdf as in shared screenshot Tags.JPG. Would you please elaborate your concerns with the help of screenshots so that we may assist you accordingly.

Moreover, you may visit Create Accessible PDF Files for your kind reference and feel free to contact us if any assistance is required in this regard.

image.png (54.3 KB)

Tags you are refering is in conetent section but not in tag section.

In the reference link I did not find the tagged element for footnote.
Kindly help. Thank you.

@vijji

We have been able to notice that Tags are not present in Tag section. Therefore, a ticket with ID PDFJAVA-38245 has been logged for further investigation and resolution.

Another investigation ticket about creation of tagged element for footnotes has been logged with ID PDFJAVA-38244. We will let you know as soon as some significant updates will be available in this regard.

The issues you have found earlier (filed as PDFJAVA-38244) have been fixed in Aspose.PDF for Java 19.2.