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.

Wed Sep 09, 2020 8:20 am

Hello,

I'm trying to convert a docx file to pdf with the latest Spire.Doc version.
It works fine for other files.
But the attached file with specific formats produce a pdf, which is not scrollable in the web browser (Chrome).

I also tried to convert the file with Word and it was sucessful.

Attached is the docx file and the resulting pdf.

Thanks in advance

Code: Select all
              using (MemoryStream wordStream = new MemoryStream(wordBytes)))
                {
                    Document document = new Document();
                    document.LoadFromStream(wordStream, FileFormat.Docx);

                    using (MemoryStream pdfStream = new MemoryStream())
                    {
                        ToPdfParameterList tpl = new ToPdfParameterList
                        {
                            UsePSCoversion = true
                        };

                        document.SaveToStream(pdfStream, tpl);
                       
                        return pdfStream.ToArray();
                    }
                }

supportProvaria
 
Posts: 3
Joined: Thu Aug 13, 2020 10:18 am

Wed Sep 09, 2020 9:41 am

Hello,

Thanks for your inquiry.
After an initial test, I did observe the issue you mentioned. This issue has been posted to our Dev team with the ticket SPIREDOC-4953 for further investigation. We will let you know if there is any update. Sorry for the inconvenience caused.
Besides, I found that using the normal method (see the code below) to convert your file, everything works fine when viewing the generated PDF document in Chrome. You can also try it.
Code: Select all
            Document document = new Document();
            document.LoadFromStream(wordStream, FileFormat.Docx);
            document.SaveToStream(pdfStream,FileFormat.PDF);


Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Wed Sep 09, 2020 11:46 am

Hi Rachel,

thanks for the fast reply.
Unfortunately the application runs in Azure and so I cannot use the normal method.

Do you have further suggestions?

Thanks in advance.

supportProvaria
 
Posts: 3
Joined: Thu Aug 13, 2020 10:18 am

Thu Sep 10, 2020 1:31 am

Hello,

I'm sorry there is currently no alternative available for you, you can only use the PS conversion method when the application is running on Azure.
Our Dev team will investigate the cause of the issue SPIREDOC-4953 and try to find a solution to solve it. Once there is any good news, we will inform you immediately.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Return to Spire.Doc