We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Converting word to pdf

In my attachment I have 3 different files,

1 file is my template
1 file is the word result from that template
1 file is the pdf result from the generated word file(converted word to pdf)

I had a problem to format the "template.docx" it looks not that perfect and the other problem is that your library does not take care at some borders and in the pdf result one page(at some point) is splited into two pages, that should not be.

Please change my word file so that I can use it.

Thank you

Attachment: Syncfusion_doc_676f9424.7z

7 Replies

VR Vijay Ramachandran Syncfusion Team May 16, 2016 10:59 AM UTC

Hi Customer,

Thank you for using Syncfusion product.

We are able to reproduce the following mentioned issues:

      1. Table border preservation issue while resaving the given Word document
      2. Text splitting issue in Word to PDF conversion

This issues will be fixed in our 2016 Volume 2 Major release.

Regards,
Vijay R
 



TE Testname May 16, 2016 11:20 AM UTC

please change the word template, so that I can use it until the new release of the patch


VR Vijay Ramachandran Syncfusion Team May 17, 2016 09:07 AM UTC

Hi Customer,

Thank you for your update.

As per your suggestion, we have modified the input Word document. Please find the modified input Word document from below link:
http://www.syncfusion.com/downloads/support/forum/124071/ze/template_Modified1817072809.zip

Let us know if you have any concern.

Regards,
Vijay R



TE Testname May 17, 2016 09:21 AM UTC

Thank you for helping :)


TE Testname May 17, 2016 01:26 PM UTC

But the  document converted from word to pdf still looks different, because the pdf adds more pages


VR Vijay Ramachandran Syncfusion Team May 18, 2016 10:57 AM UTC

Hi Customer,

Thank you for your update.

On further analysing the given document, the input template Word document “template.docx” is Word 2010 format document and result Word document “result_c49b3d0f44ac42998f05b25df7b6d4f6.docx” is Word 2013 format document which is generated using DocIO after the find and replacement operation. While opening the resultant Word document “result_c49b3d0f44ac42998f05b25df7b6d4f6.docx” in Word 2013 application, it preserves the same 5 pages similar to the DocIO generated PDF document. So it is an actual behaviour of Microsoft Word document and DocIO also doing the same. In order to preserve the same look as input Word document in the generated Word document, set “WordDocument.SaveOptions.MaintainCompatibilityMode” as true in DocIO which saves the result Word document after the find and replacement operation with original input Word document format. For your reference, w
e have prepared the sample for illustrate the usage of the MaintainComapatibilityMode property. In this sample have two buttons, one is save the Word document with same layout and another one is save the Word document as latest version. After that open the resaved Word document and perform Word to PDF conversion. Please find the sample from below link:
http://www.syncfusion.com/downloads/support/forum/124071/ze/Sample_ASP.NET-1429313128.zip

If we misunderstood any of your requirement then kindly elaborate the actual requirement with detailed description. Thereby we will analyse further on the mentioned case and will provided you appropriate solution.

Regards,
Vijay R


VR Vijay Ramachandran Syncfusion Team May 18, 2016 01:48 PM UTC

Hi Customer,

On further analysing on the mentioned table border preservation issue, we suspect that you are resave the input Word document(2010 format) as Word 2013 format. In order to resolve the mentioned table border preservation issue, you set WordDocument.SaveOptions.MaintainCompatibilityMode property as true.

Please use the below code snippet to resolve the issue:

 
        WordDocument document = new WordDocument("FileName.docx"); 
            document.SaveOptions.MaintainCompatibilityMode = true; 
            document.Save("ResultFileName.docx",FormatType.Docx); 

Regards,
Vijay R


Loader.
Live Chat Icon For mobile
Up arrow icon