This is incredibly confusing. We’re creating a word document using Open Office SDK. Some time ago we introduced the option to use “Pct” unit of measurement for table and column widths. We used to use “Dxa” exclusively. We noticed that when using Pct and if a Chinese character exists in a cell, even if it’s just ONE of them, when converting to PDF using Aspose, the table and all columns are 50% of what they were. If we remove that Chinese character, it renders fine. Also note that the Chinese character does render just fine, it’s somehow affecting the outer table width. I’m not even sure how to better ask this question.
It sounds like you’re experiencing an issue with table widths when converting a Word document to PDF, specifically when Chinese characters are included. This can be quite perplexing, especially since the characters render correctly but affect the overall table width.
Cause: The issue may stem from the measurement units used for table and column widths, font compatibility, or potential bugs in the software.
Solution: Here are some steps you can take to troubleshoot and potentially resolve this issue:
-
Check Measurement Units: Since you mentioned switching from “Dxa” to “Pct” for table and column widths, ensure that the percentage values are set correctly. Using percentage units can sometimes lead to unexpected behavior, especially with different character sets.
-
Font Settings: Verify that the font used in the Word document supports Chinese characters properly. An incompatible font might cause rendering issues during the conversion process.
-
Update Aspose.Words: Ensure you are using the latest version of Aspose.Words. Updates often include bug fixes and improvements that could resolve your issue.
-
Test with Different Characters: Try using different Chinese characters or a mix of characters to see if the issue persists. This can help identify if a specific character is causing the problem.
-
Simplify the Document: Create a simplified version of your document with just the table and the Chinese character to isolate the issue. This can help determine if other elements in the document are contributing to the problem.
-
Contact Support: If the issue continues, consider reaching out to Aspose support with a sample document that reproduces the problem. They can provide more targeted assistance.
Next Steps: Please try the above steps and let me know if they help resolve the issue. If you need further assistance, feel free to reach out!
@patrick.ryan Could you please attach the problematic input and output documents here for testing? We will check the issue and provide you more information.
@patrick.ryan Thank you for additional information. As I can see you are using an old 23.9 version of Aspose.Words. The problem is not reproducible using the latest 25.7 version of Aspose.Words. Here is the output produced on my side:
out.pdf (26.7 KB)
Please try using the latest version and let us knw if the problem still persists on your side.
Oh fantastic! So you were able to reproduce on older version and then no issues on latest? @alexey.noskov
@patrick.ryan Yes, the problem is reproducible on my side with 23.9 version of Aspose.Words. The problem is not reproducible with the latest 25.7 version.
@alexey.noskov So I tested by bumping it to 23.10 and it worked! Are you aware of this particular issue? Was it known or documented somewhere?
@patrick.ryan Each monthly Aspose.Words release contains about 80 fixes and improvements. Most likely one of these fixes resolved your problem. As I can see there are several improvements made in table rendering in 23.10 version:
https://releases.aspose.com/words/net/release-notes/2023/aspose-words-for-net-23-10-release-notes/