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

Free Support Forum - aspose.com

PDF Acessibility image alternative text

Hello,
I amb testing code provided by Aspose. PDF with image is succesfully generated. However, when I check accessibility with Acrobat PRO it fails. Message error is “all content is not tagged”. Please do you know how to do to solve the error?

Document document = new Document();
	ITaggedContent taggedContent = document.getTaggedContent();

	taggedContent.setTitle("CreatePDFwithTaggedImage");
	taggedContent.setLanguage("en-US");

	IllustrationElement figure1 = taggedContent.createFigureElement();
	taggedContent.getRootElement().appendChild(figure1);
	figure1.setAlternativeText("Aspose Logo");
	figure1.setTitle("Image 1");
	figure1.setTag("Fig");
	// Add image with resolution 300 DPI (by default)
	figure1.setImage("logo2.png");
	// Save PDF Document
	document.save("PDFwithTaggedImage.pdf");

@jgravi

Could you please share the screenshot of compliance results in Adobe Reader along with generated output PDF at your end? We will test the scenario in our environment and address it accordingly.

Hi,

Documents attached.

PDFwithTaggedImage.pdf (67.5 KB)
Captura de 2021-09-29 09-33-19.png (232.1 KB)

@jgravi

Would you please check the attached PDF for accessibility at your end and share the report with us? It is generated using a valid license and Aspose.PDF for Java 21.9.
PDFwithTaggedImage.pdf (4.1 KB)

Your PDF works fine (accessibility result attached). All page content is tagged.
Can you share java code please?

I attach my image file and java code generated using aspose.pdf-21-9.jar. It doesn’t pass the accessibility checker ( Tagged content failed).

code.zip (35.2 KB)

Captura de 2021-09-30 09-14-27.png (161.9 KB)

@jgravi

We used the same code snippet which you shared in your first post except, we used the API with valid license i.e. we set the license before executing the above code. Please use a valid or 30-days free temporary license to evaluate the API without any restrictions. In case you still notice any issues, please feel free to let us know.