Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Mon Mar 06, 2023 12:13 pm

Hi, I'm trying to convert Word document to PDF with accessibility metadata preserved, so stuff like alternative text for images, tags for screen reader, etc.
I'm attaching example Word file that I'm using, in the result pdf I only have bunch of Div/Span tags.

Spire.Doc - v11.2.3
Windows 10, x64
.NET 7

Code that I'm running:
Code: Select all
            Document document = new Document();
            document.LoadFromFile(@"WordToPDF-test.docx");
            var pdfParams = new ToPdfParameterList();
            pdfParams.PdfConformanceLevel = Spire.Pdf.PdfConformanceLevel.Pdf_A1A;
            pdfParams.CreateWordBookmarks = true;
            pdfParams.CreateWordBookmarksUsingHeadings = true;
            document.SaveToFile("Sample.pdf", pdfParams);


Should I configure something more? Is it supported? Or could be?

M_ateusz
 
Posts: 2
Joined: Mon Mar 06, 2023 12:04 pm

Tue Mar 07, 2023 4:03 am

Hi,

Thanks for your feedback.
I did a test with the information you provided, but I did not reproduce your issue, I have attached my output pdf document for your reference, is this the effect you are looking for? If so, could you please provide us with your full test project to help us do a further investigation? You can send it to us via email (support@e-iceblue.com) or attach it here. If not, please share us more information about the effect you want. Thanks for your assistance in advance.

Sincerely,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 999
Joined: Tue Nov 15, 2022 3:59 am

Tue Mar 07, 2023 8:04 am

I'm attaching accessibility check for the pdf that you've provided, so you've reproduced the issue just fine.

M_ateusz
 
Posts: 2
Joined: Mon Mar 06, 2023 12:04 pm

Wed Mar 08, 2023 3:15 am

Hi,

Thanks for your feedback.
I apologize for the misunderstanding and any inconvenience it may have caused. I have logged this issue into our issue tracking system with the ticket number SPIREDOC-9136, our developers will investigate and fix it. Once the issue is fixed, I will inform you asap. Apologize for any inconvenience this issue may have caused again.

Sincerely,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 999
Joined: Tue Nov 15, 2022 3:59 am

Thu Feb 01, 2024 10:04 am

Hi,
Thanks for your patience.
Gald to inform you that we just released Spire-Doc 12.1.17 hotfix, which has fixed the issue SPIREDOC-9136. Please download from the following link and have a test.
Code: Select all
           
Document doc = new Document();
doc.LoadFromFile(@"test.docx");

ToPdfParameterList option = new ToPdfParameterList();
option.ExportDocumentStructureTags=true;

doc.SaveToFile("result.pdf", option);

Website: https://www.e-iceblue.com/Download/download-word-for-net-now.html
Nuget: https://www.nuget.org/packages/Spire.Doc/12.1.17
Best regards,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 999
Joined: Tue Nov 15, 2022 3:59 am

Return to Spire.Doc