WordToPDFConverter line breaks mid-word

I have Word 365 documents that I need to read in and spit out pdf versions.  If I open one of the documents in Word and export it to PDF, it looks exactly as the Word document.  If I run it through the DocToPdfConverter, I have sections where a line break will occur mid-word.  The Word doc has various paragraphs, a few tables, a single image, and that is it.  No charts, nothing fancy.  Can anyone recommend where I should be looking for the source of the problem?


5 Replies

AN Anto Nihil Sahaya Raj Syncfusion Team June 27, 2022 09:00 AM UTC

Hi Joe,

We have tried to reproduce the reported problem using the given details while converting Word document to PDF. But it works properly at our end. For your reference, we have attached the sample application which we used to reproduce the reported issue and it can be downloaded from the below attachment.


Please find the input Word document in the “Data” folder of the attached sample application.

We suspect that the reported problem might be due to the contents in the input Word document which used at your end. So, could you please share with us the input Word document along with a modified sample of above which reproduces the issue or code snippet. Also a screenshot of the issue.

This will be more helpful to reproduce the same issue at our end. Thereby, we will proceed further on the reported issue and provide you with the appropriate solution at the earliest.


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

Regards,
Anto Nihil S


Attachment: ConsoleApp1_e59eebd7.zip


JB Joe Baker June 27, 2022 12:01 PM UTC

Thank you so much for your reply, Anto.  Using your program along with my Word files, I was able to get a correct-looking PDF in the output.  In an effort to figure out where I went wrong, I created a second console app in the same solution you provided.  This second console application produces the results I experienced in my primary application.  Here are the steps I followed:

  1. Created a console app, targeting .NET 6.0
  2. Added the following NuGet packages
    1. Syncfusion.DocToPdfConverter.WinForms
    2. SyncFusion.OfficeChartToImageConverter.WinForms
    3. System.Drawing.Common
  3. Copied the Data and Output directories from your project to the new one
  4. Copied the contents of Program.cs from your project to the new one (making changes only to the path for the input/output files)
  5. Built and ran the application
Here is a snippet of the content from the file from your application:
image_4.png
Here is the same snippet of the content from my application:

As you can see, the highlighted word "Deductions" does not break on the line as expected.  This occurs on page 16 of the PDF document (labeled as page 13).

We would prefer not to have to use an older version of .Net Framework, if at all possible.

Cheers!
Joe

Attachment: ConsoleApp1_and2_ed007faf.zip


AN Anto Nihil Sahaya Raj Syncfusion Team June 28, 2022 12:19 PM UTC

Hi Joe,

We have reproduced the reported issue with “Word splitted while converting 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 30th June 2022.

Regards,
Anto Nihil S



AN Anto Nihil Sahaya Raj Syncfusion Team June 30, 2022 06:50 PM UTC

Hi Joe,

We have confirmed that the reported
issue with Word splitted while converting Word document to PDFis a defect and we have logged a defect report. We will include the fix for this defect in our weekly NuGet release which is estimated to be available on 19th July 2022.

The status of this bug can be tracked through the below link:
https://www.syncfusion.com/feedback/36034/word-splitted-while-converting-word-document-to-pdf-in-net6-0

Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”

Also, we have suggested you to use the proper NuGet packages in your application based on the target and platform.

The following NuGet packages need to be installed in your application based on the target and platform,

Platform(s)

Package name

Package manager console command

Windows Forms, Console Application (Targeting .NET Framework)

Syncfusion.DocToPdfConverter.WinForms.nupkg

Install-Package Syncfusion.DocToPdfConverter.WinForms

ASP.NET Core, Console Application (Targeting .NET Core or .NET)

Syncfusion.DocIORenderer.Net.Core.nupkg

Install-Package Syncfusion.DocIORenderer.Net.Core


Please refer our UG documentation to know about the NuGet packages that need to be installed in your application,
https://help.syncfusion.com/file-formats/docio/nuget-packages-required#converting-word-document-to-pdf

Regards,
Anto Nihil S



AN Anto Nihil Sahaya Raj Syncfusion Team July 19, 2022 11:54 AM UTC

Hi Joe,

As promised earlier, we have included the fix for the reported issue with “Word splitted while converting Word document to PDF
” in our latest weekly NuGet release (v20.2.0.39).


Please use the below link to download our latest weekly NuGet based on the target and platform

Platform(s)

Package name

Windows Forms, Console Application (Targeting .NET Framework)

https://www.nuget.org/packages/Syncfusion.DocToPDFConverter.WinForms/20.2.0.39

ASP.NET Core, Console Application (Targeting .NET Core or .NET)

https://www.nuget.org/packages/Syncfusion.DocIORenderer.Net.Core/20.2.0.39


The status of this bug task can be tracked through the below link:

https://www.syncfusion.com/feedback/36034/word-splitted-while-converting-word-document-to-pdf-in-net6-0

Note: We will include this fix in our 2022 Volume 2 SP release which will be available in mid of August 2022.

Regards,
Anto Nihil S


Loader.
Up arrow icon