Hi. I think this is a bug that you fixed in Aspose.PDF, but not in Aspose.Words (?) (PDFNET-45672)
files.zip (160.8 KB)
We use v20.7
Here is code if that is needed
public MemoryStream ToPdf(Stream documentStream, string basePath)
{
var document = new Document(documentStream);
var pdfStream = new MemoryStream();
document.Save(pdfStream, GetMoreAccessibilityFriendlyOptions());
// Aspose.Words doesn't reset the position of the stream after save
pdfStream.Position = 0;
return pdfStream;
}
private PdfSaveOptions GetMoreAccessibilityFriendlyOptions()
{
var options = new PdfSaveOptions()
{
Compliance = PdfCompliance.PdfA1a,
ExportDocumentStructure = true,
FontEmbeddingMode = PdfFontEmbeddingMode.EmbedAll,
EmbedFullFonts = false,
UseCoreFonts = false,
PreserveFormFields = false,
HeaderFooterBookmarksExportMode = HeaderFooterBookmarksExportMode.All,
DisplayDocTitle = true
};
return options;
}