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)