Tagging each image in Pdf for accessibility

Hi,

I was just wondering if its possible to loop through all the images in a pdf and add text tag to the image, so that the images can be read using a screen reader software used by people with visual impairment?
If so, can you please provide with a code snippet?

Thank you

This is how far I have reached.

var pdfDocument = new Document(@"C:\Users\dpft\Desktop\TH.pdf");
var structure = pdfDocument.LogicalStructure;

var structElement = structure.Children;

var children = structElement[0].Children;

foreach (var child in children)
        {
            if (child is Aspose.Pdf.Structure.FigureElement)
            {
                child.Alt = "HaHaHeHeHuHuHoHo";
            }
        }
pdfDocument.Save(@"C:\Users\dpft\Desktop\TH11.pdf");

This doesnt seem to do the job. That is, hovering over the image does not show the text HaHa…

Please let me know if I am missing anything here.

Thank you.

@arjunbox

Thanks for contacting support.

Could you please share your sample PDF document with us. We will test the scenario in our environment and address it accordingly.

TH.pdf (255.6 KB)

Please find attached. The pdf has couple of Tom Hanks images and a scenery. All I want is when the user hovers over the image, it displays HaHa…

Thank you.

@arjunbox

Thanks for sharing sample PDF.

A ticket (PDFNET-46040) has been logged in our issue tracking system to check the feasibility of your requirements. We will definitely check the scenario in details and keep you posted with the status of ticket resolution. Please spare us little time.

We are sorry for the inconvenience.

Hi Asad,

Are you able to reproduce the issue? If so, I look forward to the resolution.

Thank you.

@arjunbox

Yes, we were able to replicate the issue in our environment and will definitely look into logged ticket in order to provide its resolution. We will let you know in case of additional details regarding ticket resolution.

Can you please provide an update on this? Has this ticket been resolved?

Thank you.

@arjunbox

We regret to share that earlier logged ticket is pending for resolution. Please note that the ticket is related to a functionality which is not completely added in the API and process to complete this feature is still underway. Your required feature depends upon other relative functionalities which need to be added in the API first, so this may take some time to get available.

Nevertheless, your concerns have been recorded and will definitely be taken care of during investigation of the ticket. As soon as some definite updates are available about ticket resolution, we will share with you. Please spare us little time.

We are sorry for the inconvenience.

The issues you have found earlier (filed as PDFNET-46040) have been fixed in Aspose.PDF for .NET 19.4.