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 Nov 05, 2018 6:22 pm

We’re trying to build a demo application using the Spire.Office trial version to present it to our client.

When trying to convert a Word document to PDF using the conversion tool on your website, the conversion goes well.

But, when converting in our demo application, we got a totally different result.

Check the image bellow, the left side is a screenshot of the Word document and the right side is a screenshot of the PDF generated.

Image

We tried using Spire.Office version 3.10.3, 3.10.2, 3.6.0 and 2.16.27 from Nuget and downloading the DLL's directly from your website, the result is always the same.

Basically, this is the code snippet we are using to do the conversion:

Code: Select all
var document = new Spire.Doc.Document();
document.LoadFromFile(@"C:\temp\demo.docx", Spire.Doc.FileFormat.Auto);
document.SaveToFile(@"C:\temp\demo.pdf", Spire.Doc.FileFormat.PDF);

jfbueno
 
Posts: 2
Joined: Tue Oct 30, 2018 2:03 pm

Tue Nov 06, 2018 3:52 am

Hi,

Thanks for your inquiry.
Could you please provide us with a sample file which causes this issue via email(support@e-iceblue.com), so that we can look into the case?
Sincerely,
Mike
E-iceblue support team
User avatar

Mike.Zhang
 
Posts: 93
Joined: Thu Sep 27, 2018 7:11 am

Tue Nov 06, 2018 12:01 pm

Hey, I sent a e-mail to you with the file.

Thanks a lot for your help.

jfbueno
 
Posts: 2
Joined: Tue Oct 30, 2018 2:03 pm

Wed Nov 07, 2018 2:29 am

Hi,

Thank you for the document provided var email.
There is another method to convert Word to PDF in Spire.Doc. I have tested this method and it works well with the latest Spire.Office (DLL Only) Version:3.10.3. Please refer to below code.
Code: Select all
    Document doc = new Document();
    doc.LoadFromFile(input);
    ToPdfParameterList tpl = new ToPdfParameterList();
    tpl.UsePSCoversion = true;
    doc.SaveToFile(output,tpl);

Any question, feel free to contact us.
Sincerely,
Mike
E-iceblue support team
User avatar

Mike.Zhang
 
Posts: 93
Joined: Thu Sep 27, 2018 7:11 am

Return to Spire.Doc