Measurements unit problem

Hi,

For cell padding, I noticed that if the source file is set in points (ruler) then if someone sets cell padding with decimal value for example 5.4pt 

Then docio will return TableFormat.Paddings with values ​​of 0.

(checked with other units also having this problem)


Please check the latest version.


Thanks you!

jamin


8 Replies 1 reply marked as answer

SR Sindhu Ramesh Syncfusion Team January 23, 2025 07:59 AM UTC

Hi jamin,
We suspect that you are setting paddings for WTableCell.CellFormat.Paddings, but you are trying to check the paddings from the WTable.TableFormat.Paddings. Each cell has its own specific paddings, whereas table paddings can be set for the entire table. If you still encounter any issues, kindly share the code snippet and input document.

Regards,
Sindhu Ramesh.



JA jamin replied to Sindhu Ramesh January 23, 2025 09:11 AM UTC

Hi Sindhu ,


Please test this file with both methods above. (there is a problem is when I set the value to an integer it works fine).

It seems they both have the same result.


Thanks you!

jamin


Attachment: test_80d195f6.rar



SR Sindhu Ramesh Syncfusion Team January 24, 2025 08:26 AM UTC

jamin,
We have reproduced the reported issue: “Default paddings not set properly for table and cell format” on our end. We will validate this issue and provide you with more details within two days.

Regards,
Sindhu Ramesh.



SR Sindhu Ramesh Syncfusion Team January 28, 2025 04:49 PM UTC

Jamin,
Upon further analysis of the provided document, we found that the table padding values are not specified inline. In Microsoft Word, the padding values are retrieved based on the table styles. Currently DocIO does not have the support to retrieve the table properties from table style. We have already logged this requirement as a feature, and we don’t have immediate plan to implement this feature.

The status of the feature report can be tracked through the below link:
feedback link



JA jamin January 29, 2025 09:07 AM UTC

Hi Sindhu


When I set table padding to 5pt then docio can read (table.padding return 5). but then when I change it back to 5.4pt then docio returns 0 (a bit strange)

.

Anyway setting the value to an integer is the alternative solution right now.


Thanks you!

jamin



SR Sindhu Ramesh Syncfusion Team January 30, 2025 11:12 AM UTC

Jamin,
If you set the padding value programmatically using DocIO, such as

doc.LastSection.Tables[0].TableFormat.Paddings.Left = 5.4f;

This value will be written to the file. When you parse the saved file, DocIO will preserve the padding values because they are stored at the file level.

However, when 5.4pt is set in Microsoft word, it is the default padding for tables, and in this case, it is applied based on the table style. Any padding value other than 5.4pt, whether an integer or a float, will be preserved in DocIO. Since DocIO only works with file-level information, default padding values applied via table styles are not retrieved or preserved, resulting in a value of 0.

In Microsoft Word, the padding values are retrieved based on the table styles. Currently DocIO does not have the support to retrieve the table properties from table style. We have already logged this requirement as a feature, and we don’t have immediate plan to implement this feature.

The status of the feature report can be tracked through the below link:
feedback link

Regards,
Sindhu Ramesh.


Marked as answer

JA jamin January 30, 2025 12:15 PM UTC

Hi Sindhu,


Thanks for pointing it out. The issue is clear to me now.


Thanks you,

jamin



CA Chrispine Agunja Imbo Syncfusion Team January 31, 2025 05:52 AM UTC

You are welcome Jamin. Please contact us if you need further assistance. We are always happy to help.

Regards,

Chris


Loader.
Up arrow icon