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.
Unfortunately, activation email could not send to your email. Please try again.

Converting word to pdf

Thread ID:

Created:

Updated:

Platform:

Replies:

124071 May 13,2016 02:06 AM May 18,2016 09:48 AM ASP.NET MVC 7
loading
Tags: DocIO
Testname
Asked On May 13, 2016 02:06 AM

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

Vijay Ramachandran [Syncfusion]
Replied On May 16, 2016 06:59 AM

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
 


Testname
Replied On May 16, 2016 07:20 AM

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

Vijay Ramachandran [Syncfusion]
Replied On May 17, 2016 05:07 AM

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


Testname
Replied On May 17, 2016 05:21 AM

Thank you for helping :)

Testname
Replied On May 17, 2016 09:26 AM

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

Vijay Ramachandran [Syncfusion]
Replied On May 18, 2016 06:57 AM

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

Vijay Ramachandran [Syncfusion]
Replied On May 18, 2016 09:48 AM

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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;