DOCX to PDF Conversion Issue – Overlapping Text and Entities (Shape, WTextRange, WTextBox)

Description:

During the DOCX to PDF conversion, certain elements such as Shape, WTextRange, and WTextBox are not being placed correctly, resulting in overlapping text and other elements. This issue is observed in the attached sample DOCX file. The overlapping happens when converting the document, causing misalignment and improper placement of these entities in the output PDF.


Issue Details:

  1. Entities Affected:

    • Shape

    • WTextRange

    • WTextBox

  2. Problem:

    • When converting DOCX to PDF, the entities above (Shape, WTextRange, WTextBox) are not properly aligned and overlap with other elements in the document.

    • Manual handling of each element type (such as setting text alignment or wrapping for shapes) seems to be required, which adds unnecessary complexity to the conversion process.

  3. Expected Behavior:

    • The DOCX to PDF conversion should correctly process and place elements like shapes, text ranges, and text boxes without overlapping.

    • No manual intervention should be required to properly place or align these elements.



Attachment: test99999999_f648eb83.pdf

9 Replies

SG Suresh Ganesan Syncfusion Team April 28, 2025 02:37 PM UTC

Hi Mohammad,
Kindly share the below details. This will allow us to analyze the problem and provide you with a suitable solution at the earliest:
1. Input document
2. Environmental details (Operating System, if using cloud service, share cloud service and plan details).

Additional information:
Upon further analysis, we suspect that the fonts used in your Word document are not rendering properly in the generated PDF. This is due to missing fonts in your production environment.
We have font substitution event handler to ensure the fonts are available on your machine. Kindly ensure that all the required fonts used in input documents are installed on your system.
If you are working in an environment where installing the necessary fonts is not possible, you can use our substitution event handler to provide the font files for the missing fonts.
UG link - Font Substitution in Word to PDF Conversion in C# | DocIO | Syncfusion
GitHub link - DocIO-Examples/Word-to-PDF-Conversion/Use-alternate-installed-font at main · SyncfusionExamples/DocIO-Examples · GitHub

Regards,
Suresh Ganesan



MT Mohammad Taha Yaseen May 13, 2025 05:40 AM UTC



MT Mohammad Taha Yaseen May 13, 2025 05:48 AM UTC



SG Suresh Ganesan Syncfusion Team May 13, 2025 04:28 PM UTC

Mohammad,
We have already logged the bug report titled "Table inside TextBox is not preserved properly while converting DOCX to PDF”. We will include the fix for this defect in our weekly NuGet release, which is estimated to be available on 20th May 2025.

The status of this bug can be tracked through the below link:
Table inside TextBox is not preserved properly while converting DOCX to PDF in ASP.NET Core | Feedback Portal

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.



SR Sindhu Ramesh Syncfusion Team May 22, 2025 04:17 AM UTC

Mohammad,
We regret not including the fix for the issue "Table inside TextBox is not preserved properly while converting DOCX to PDF" as promised in the weekly release published on 20th May 2025. This fix will be included in the next weekly release which will be available on 27th May 2025 without further delay.

We apologize for any inconvenience this may have caused and appreciate your understanding



MT Mohammad Taha Yaseen May 28, 2025 07:41 AM UTC

Hi Sindhu,

I’ve just verified with the latest build but unfortunately, I’m still encountering the same issue.

Could you please confirm if the fix has indeed been deployed in the 27th May release? If yes, I’d appreciate any guidance on verifying or applying it correctly on my end.

Looking forward to your response.



SG Suresh Ganesan Syncfusion Team May 29, 2025 02:20 PM UTC

Hi Mohammady,
We regret not including the fix for the issue "Table inside TextBox is not preserved properly while converting DOCX to PDF" as promised in the weekly release published on 27th May 2025. We have identified some failures during testing. We will address these issues and include the fix in the next weekly release which will be available on 3rd June 2025 without further delay.

However, custom NuGet was prepared with our fix. Kindly refer to the attachment. We apologize for any inconvenience this may have caused and appreciate your understanding.

Regards,
Suresh Ganesan


Attachment: syncfusion.docio.net.core.29.2.7_609c89ba.zip


SR Sindhu Ramesh Syncfusion Team June 3, 2025 06:53 AM UTC

Mohammad,
As promised earlier, we have included the fix for the reported issue with “Table inside TextBox is not preserved properly while converting DOCX to PDF” in our latest weekly NuGet release (v29.2.8).

Root cause of the issue:
TextBox with relative width not handled properly causing an issue

Please use the below link to download our latest weekly NuGet:
Syncfusion.DocIORenderer.Net.Core

The status of this bug can be tracked through the below link:
Table inside TextBox is not preserved properly while converting DOCX to PDF in ASP.NET Core | Feedback Portal

Note: We will include this fix in our 2025 Volume 2 main release, which will be available in the mid of June 2025.



TD Tom Danny June 15, 2025 06:47 AM UTC

Custom mugs make a bold statement—just like clearly formatted documents should. Facing a DOCX to PDF conversion issue with overlapping text and elements like shapes and text boxes? It’s a common frustration. Ensure compatibility by using trusted tools like Adobe or online converters that retain layout integrity. Just as a well-designed mug delivers your brand message with clarity, your documents should reflect precision and professionalism, free from visual clutter or confusion.


Loader.
Up arrow icon