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

Free Support Forum - aspose.com

Part structure element used as root element

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;
}

@lars.olsson

Could you please share the steps that you are using to check the PDF? We will investigate the issue and provide you more information on it.

I am using PAC3 to see the logical structure (https://www.access-for-all.ch/ch/pdf-werkstatt/pdf-accessibility-checker-pac/download-pac-3.html)

@lars.olsson

This issue has been logged in our issue tracking system as WORDSNET-20793. We will inform you via this forum thread once this issue is resolved.

We apologize for your inconvenience.

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