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

Free Support Forum - aspose.com

Aspose words export to PDF missing alternative text for image in header

Hello!

We are using Aspose words 19.12.0.0 for creating PDFs. But the output doesn’t have the alternative text for images in the header. When we are exporting PDF in MS word the alternative text for the header image is still there. I found this subject that were similar but it didn’t solve the problem: Alternative text for images in PDF header
Is there a setting or a workaround so that we can get the desired output? We need that to be compliant with the accesibility guidelines.

Below is a code sample when we are using the PDFSaveOptions and attached are the output from aspose, output from MS word and the original document.

	private static Stream TransformUsingWords(string inputFilename, Aspose.Words.LoadFormat loadFormat)
	{
		var doc = new Aspose.Words.Document(inputFilename, new Aspose.Words.LoadOptions { LoadFormat = loadFormat });
		var ms = new MemoryStream();
		WordPdfSaveOptions so = new WordPdfSaveOptions
		{
			SaveFormat = SaveFormat.Pdf,
			EmbedFullFonts = false,
			FontEmbeddingMode = PdfFontEmbeddingMode.EmbedAll,
			DisplayDocTitle = true, //A flag specifying whether the window’s title bar should display the document title taken from the Title entry of the document information dictionary.
			OutlineOptions = { HeadingsOutlineLevels = 6 },    // Specifies how many levels of headings (paragraphs formatted with the Heading styles) to include in the document outline. 0-9 Levels.
			ExportDocumentStructure = true //Preserves document structure, increases PDF file size.
		};
		doc.Save(ms, so);
		return ms;
	}

Best regards,

Marcus Test with image in header with alternative text - generated with aspose.pdf (24.1 KB)
Test with image in header with alternative text - generated from word.pdf (44.4 KB)
Test with image in header with alternative text.docx (27.2 KB)

We have not found the alternative text of image in PDF generated by MS Word. Could you please share the steps that you are using to view it? Please also share the screenshot of alternative text in PDF file. We will investigate the issue and provide you more information on it.

We are using Adobe Acrobat DC Pro and with the accesibility checker in that program we get an error for the alternative text with the Aspose export. See attached screenshots from the program with the two different exported PDF documents. Sorry for the swedish in the screenshots.

Best regards,
Marcus
AsposeExportAccesibility.png (19.0 KB)
WordExportAccesibility.png (21.9 KB)

@admin.aspose.solarpl

We have tested the scenario and 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-22872. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

@admin.aspose.solarpl

It is to inform you that the issue which you are facing is actually not a bug in Aspose.Words. So, we have closed this issue (WORDSNET-22872) as ‘Not a Bug’.

Please note that in your document the picture is placed in the header and therefore will be labeled as artifact. That is, the alt text will not be used for such shapes.