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

Free Support Forum - aspose.com

Accessibility issues with converted word document to pdf

We have an issue with converting a doc/docx file to a pdf, and maintaining all accessibility information for the document. We have used the following code-snippet to ensure that structured content is copied to the destination pdf:

    using (Stream tempStream = File.Create(tempFile.FullName))
        PdfSaveOptions options = new PdfSaveOptions();
        options.ExportDocumentStructure = true;
        options.DisplayDocTitle = true;
        options.PreserveFormFields = true;
        m_Document.Save(tempStream, options);

When doing this action, the resulting pdf retains all tagged/ordered content from the word document in terms of the text content. However, when you insert an image to the word document, and give the image an alt-text property, the document does not retain the image as tagged content, and does not copy over the alt-text of the image/table properly, resulting in the failure of multiple conditions on an accessibility check in adobe acrobat.

acrobat_ss.PNG (216.6 KB)
aspose doc with image.zip (643.6 KB)

Are there additional parameters needed in the save options to get the images to be processed properly?

Aspose.Words: v19.9.0

Aspose.PDF: v19.9.0

Framework: .Net Core 2.2

Platform: Linux Docker Container (mcr.microsoft.com/dotnet/core/aspnet:2.2-stretch-slim) (Debian 9 base)


We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-19302. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

1 Like

A post was split to a new topic: Accessibility problems with converted word document to PDF

The issues you have found earlier (filed as WORDSNET-19302) have been fixed in this Aspose.Words for .NET 19.12 update and this Aspose.Words for Java 19.12 update.