.Net Framework 4.7.2 issues with converting word docs to pdfs

Hi. I’m converting word docs to pdfs in an azure cloud service using the .Net Framework 4.7.2. Some word docs have a blank page at the end and that blank page isn’t included in the converted PDF. Is there a way to prevent this? 


Also I’m having an issue with charts not being converted. Below is my code, the original document, and converted document.



Original Document

Converted Document 




14 Replies

MR Manikandan Ravichandran Syncfusion Team August 19, 2021 06:38 AM UTC

Hi Luke,

Thank you for contacting Syncfusion support.

We have already faced this kind of preservation issue and fixed in our end. This issue will be resolved by using the below code example.

 
DocToPDFConverter converter = new DocToPDFConverter();
converter.Settings.RecreateNestedMetafile =
true; 

Please refer the below link to know more about the mentioned API.
https://help.syncfusion.com/file-formats/docio/word-to-pdf#recreate-nested-metafile

Please let us know if you have any other questions

Regards,
Manikandan Ravichandran
 



LC Luke Carlson August 19, 2021 12:05 PM UTC

Hi  Manikandan,


Thank you! One question, will that also fix the blank page in the word doc not being brought over into the pdf? 



MR Manikandan Ravichandran Syncfusion Team August 20, 2021 07:38 AM UTC

 Hi Luke,

Thank you for your update.

We are not able to reproduce the blank page issue in our end without the input document. So, could you please share the input document and generated output PDF document to us for investigating further on this issue.

Please let us know if you have any other questions.

Regards,
Manikandan Ravichandran
 



LC Luke Carlson August 20, 2021 02:55 PM UTC

Ah nevermind. It appears to be a pagination issue. Seems like when it converts to PDF it doesn't recognize that there needs to be another page. It's also moving some text across pages. 



MR Manikandan Ravichandran Syncfusion Team August 23, 2021 10:12 AM UTC

Hi Luke,

Thank you for your update.

The pagination issue may occur due to Text alignment or paragraph spacing or missing of fonts in production environment or based on the content in the word document. So, kindly share the input document for validating further on this pagination problem

Note: If you have any confidential data in your Word document, please replace with some dummy data and provide us the same. We just need your document to recreate the problem you face.

Please let us know if you have any other queries.

Regards,
Manikandan Ravichandran
 



LC Luke Carlson August 23, 2021 12:12 PM UTC

Hi Manikandan!


Here is the document. Thank you. 


Attachment: RevMod_Order_93e4489c.zip


MR Manikandan Ravichandran Syncfusion Team August 24, 2021 11:06 AM UTC

Hi Luke,

Thank you for your update.

We have reproduced the reported issue with “Pagination issue while converting a Word document to PDF” in our end. and we suspect it to be a defect. We will validate this issue and update you with more details on 26th August 2021.

Please let us know if you have any other queries.

Regards,
Manikandan Ravichandran
 



MR Manikandan Ravichandran Syncfusion Team August 26, 2021 04:12 PM UTC

Hi Luke,

Thank you for your update.

On further validating the reported pagination issue, we have suspect that this issue may occurs due to missing of fonts. When open the Font Substitution option in Microsoft Word application, we have found some used fonts are missing.

Please refer the below screenshot.
 

So, could you please share the used fonts in the document to us for investigate further on this issue.

Please let us know if you have any other queries.

Regards,
Manikandan Ravichandran 



LC Luke Carlson August 26, 2021 04:50 PM UTC

Hi Manikandan, 


I haven't altered the fonts so what you see there should be it. Is there a way to ensure that the conversion process includes those fonts? 



MR Manikandan Ravichandran Syncfusion Team August 27, 2021 01:34 PM UTC

Hi Luke,

Thank you for your update.

Currently we are validating the issue with high priority and we will update more details about this issue on 31st August 2021 without further delay.

Please refer the below link to know the missing fonts in the document.
https://www.syncfusion.com/kb/7570/what-happens-when-the-word-document-used-fonts-for-a-text-is-not-installed-in-production

Please let us know if you have any other queries.

Regards,
Manikandan Ravichandran 



LC Luke Carlson August 30, 2021 01:25 PM UTC

Hi Manikandan, 


I tried adding the font substitution method, but it did not fix the pagination issue. 





MR Manikandan Ravichandran Syncfusion Team August 31, 2021 03:01 PM UTC

Hi Luke,

Thank you for your update.

Internally, DocIO uses System.Drawing functionalities to measure each content and render them in output PDF during Word to PDF conversion. We have found there is a minute difference between the text size measuring of System.Drawing functionality and Microsoft Word application behaviour with specific to Segoe UI fonts. This minute decimal level difference makes a paragraph moves to previous page which results in pagination difference in the resultant PDF document. We strongly recommend you to use some standard fonts for the content like Calibri, Times New Roman etc., to preserve contents properly.

We have modified the input Word document with Calibri font to resolve this problem at your side and we suggest you to use this modified document to perform Word to PDF conversion.

Please find the modified input document from below link.
https://www.syncfusion.com/downloads/support/forum/168191/doc/RevMod_Order_ModifiedDocument575649149

Please let us know if you have any other queries.

Regards,
Manikandan Ravichandran 



LC Luke Carlson August 31, 2021 03:24 PM UTC

Hi Manikandan,


The document looks much better after the conversion process with those font changes. There are still a few differences, for instance the end of pages 5, 6, and 7, but overall much better. I will get with my team and get back to you. Thank you again!



MR Manikandan Ravichandran Syncfusion Team September 1, 2021 01:57 PM UTC

Hi Luke,

Thank you for your update.

We will wait until hear back from you. If you are facing any issues in the given Word document, kindly share the generated output PDF document and screenshot of the issue which will helpful for us to investigate further on this issue and we will share the details faster.

Please let us know if you have any other queries.

Regards,
Manikandan Ravichandran 


Loader.
Up arrow icon