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)