Pdf convert lost format?

Hello,

I have the same problem with this post but in Winform. after converting docx to pdf using 

PdfLoadedDocument

The column widths of table2 in Word are no longer proportional to the pdf (they have overflowed the page).

Update

Not sure, but it seems that table1 is the cause of table2 overflowing.

If I delete table1 or shrink table1 width, then it work.

Image_9070_1721114058072



6 Replies

DA Dharanitharan Ayyasamy Syncfusion Team July 16, 2024 03:24 PM UTC

Hi jamin,

We have tried to replicate the reported query using a sample application by converting the Word document to PDF using PdfLoadedDocument. It is working fine from our end and the tables are also preserved properly in the output PDF document. We suspect that the cause of the error pop up may be related to the internal structure and the table properties used in the input Word document. Kindly find the below attached sample application which we have tried to replicate the reported problem.

Please let us know whether the reported problem is resolved with the provided sample. If you are still facing any reported issues kindly share the below details from your end, which will be helpful to reproduce the exact issue at our end and proceed further with this.
1. Input Word document.
2. Complete code snippet or modified sample application.
Thereby we will analyze this further and provide you with the appropriate solution at the earliest.

Regards,
Dharanitharan A.


Attachment: ConvertWordToPDF_c3357a53.zip


JA jamin July 16, 2024 10:02 PM UTC

Hi

@ Ayyasamy, please check this test.



DA Dharanitharan Ayyasamy Syncfusion Team July 17, 2024 12:03 PM UTC

Jamin, we have reproduced the reported problem “Table is not preserved properly while converting a Word document to PDF” on our end. We will validate this issue and update you with more details within two days.



DA Dharanitharan Ayyasamy Syncfusion Team July 19, 2024 02:24 PM UTC

Jamin, on further validating, this problem occurs due to width difference in file level and UI level in the document. The given document is binary format of Word document (DOC), DocIO preserves table based on the file level information only. But Microsoft Word application calculates some width to preserve the contents in visual appearance. DocIO implemented these kinds of table cell width calculating behavior for DOCX format documents only. DOC is old binary format, and we are concentrating on implementing new features to DOCX format only. So, we recommend you use DOCX format document to preserve the table as like viewer.

But currently the table exceeds the client width and content in the table clipped. So, we will provide the fix to preserve the table inside client width. After our fix the table will not preserve equal to viewer, but it will preserve the table inside client width with all content as readable.

We have confirmed that the reported issue with “Table exceeds client width is not preserved properly while converting a DOC format document to PDF” is 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 in the first week of August 2024.

The status of this bug can be tracked through the feedback link.

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.



DA Dharanitharan Ayyasamy Syncfusion Team August 6, 2024 06:09 AM UTC

Jamin, as we have promised earlier, we have included the fix for the reported issue with Table exceeds client width is not preserved properly while converting a DOC format document to PDF” in our latest weekly NuGet release (v26.2.8).

Root cause of the issue:
In the document provided, the table width exceeds the client width. Therefore, the reported issue occurs.

Please use the below link to download our weekly NuGet:
Syncfusion.DocToPDFConverter.WinForms

The status of this bug can be tracked through the feedback link.

Note: We will include this fix in our 2024 Volume 3 release, which will be available at the beginning of September 2024.



JA jamin August 25, 2024 06:32 PM UTC

Hi Ayyasamy,

Thanks for the info, I will check nuget and maybe install Volume 3 once it is released.


Loader.
Up arrow icon