We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

wrong result of cell width and height

Thread ID:

Created:

Updated:

Platform:

Replies:

150503 Jan 9,2020 08:43 AM UTC Feb 7,2020 08:52 AM UTC WinForms 7
loading
Tags: DocIO
AtliDev
Asked On January 9, 2020 08:43 AM UTC

hi,
i'm trying to get the correcte width and height of cell , but the result is not the same giving in word.
exemple the real width is 18,38 cm = 525,1 pt result using code is 536,1 pt
can i have an explantion for this ? the cell have an other property apart the marge ?

the code i use for this : 

        Dim a As WordDocument = New WordDocument(chemin + "\testword\test.doc")

        Dim table As WTable = a.Sections(0).Tables(0)
        Dim cell As WTableCell = table.Item(1, 0)

        ' the real width of cell is : 18,38cm -> 525,1pt
        Console.WriteLine(cell.Width)
        ' the real height of cell is : 20cm -> 571,43pt
        Console.WriteLine(cell.OwnerRow.Height)
        ' the real marge is : 0,19cm -> 5,43pt
        Console.WriteLine("marge right " + cell.OwnerRow.RowFormat.Paddings.Right.ToString +
                          " marge left " + cell.OwnerRow.RowFormat.Paddings.Left.ToString)


i give attached my sample , maybe is a particular exemple.

thanks for help.

Attachment: sample_f1c22e41.zip

Manikandan Ravichandran [Syncfusion]
Replied On January 9, 2020 04:24 PM UTC

Hi AtilDev,

Thank you for contacting Syncfusion.

The reason for this is, we have added the left padding and right padding values to the table width. So, the cell width is not expected. If you remove the left padding and right padding from the word document, you will get same values as like as expected.
Kindly refer the screenshot for removing the left padding and right padding from the document (Right click the table -> Table properties -> Table ->Option -> Left = 0 and right =0).
 
 


Please let us know if you have any other questions.

Thanks and Regards,
Manikandan Ravichandran


AtliDev
Replied On January 10, 2020 10:15 AM UTC

thanks for help,
i have an other case and i can't get the correct width.
the problem is relative to the library 
the old one : 17.3350.0.14 give the correcte size  => 900,75 pt
the new one : 17.4350.0.39 give a wrong size => 304,4 pt


can i have a explication please ?

the code i use :
        Dim a As WordDocument = New WordDocument(chemin + "\testword\ExempleCellWidth.doc")
        Dim bknav As BookmarksNavigator = New BookmarksNavigator(a)
        bknav.MoveToBookmark("croquis")

        Dim currow As WTableRow = bknav.CurrentBookmarkItem.Owner.Owner.Owner
        Dim curcell As WTableCell = bknav.CurrentBookmarkItem.Owner.Owner

        Console.WriteLine(curcell.Width)

and i give bellow the sample for test : 




Attachment: sample_a7f516c9.zip

Manikandan Ravichandran [Syncfusion]
Replied On January 10, 2020 04:15 PM UTC

Hi AtliDev,

Thank you for your update.

We have reproduced the reported “Cell width is not as expected while reading the word document “from our side. We will validate the reported problem and update you more details about this on 14th, January 2020

Please let us know if you have any other questions

Thanks and Regards,
Manikandan Ravichandran
 


Manikandan Ravichandran [Syncfusion]
Replied On January 14, 2020 12:42 PM UTC

Hi Jigar,

Thank you for patience.

We have confirmed that the reported “Cell width is not preserved properly while opening the DOC format word document” is a defect and we have logged a defect report. The fix for this defect is estimated to be available on 22nd January, 2020.

The status of this feature task can be tracked through the below link:
https://www.syncfusion.com/feedback/11297/cell-width-is-not-as-expected-while-opening-the-doc-format-word-document

Note: Since you have mentioned the version as 17.4.0.39, so we will provide you the patch for this issue in this version. If you are using any other Essential Studio version then kindly let us know the currently installed version, so that we can provide patch in that version based on our SLA policy.

Please let us know if you have any other questions.

Regards,
Manikandan Ravichandran 


Manikandan Ravichandran [Syncfusion]
Replied On January 22, 2020 11:03 AM UTC

Hi AtliDev,

Thank you for your patience.

We have fixed the reported “Cell width is not as expected while opening the DOC format Word document” and the patch for the fix can be downloaded from the following link

Recommended approach - exe will perform automatic configuration
Please find the patch setup from below location:
http://syncfusion.com/Installs/support/patch/17.4.0.39/1122042/F150503/SyncfusionPatch_17.4.0.39_1122042_1222020031205222_F150503.exe

Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment
Please find the patch assemblies alone from below location:
http://syncfusion.com/Installs/support/patch/17.4.0.39/1122042/F150503/SyncfusionPatch_17.4.0.39_1122042_1222020031205222_F150503.zip

NuGet
http://syncfusion.com/Installs/support/patch/17.4.0.39/1122042/F150503/SyncfusionNuget_17.4.0.39_1122042_1222020031205222_F150503.zip

Assembly Version : 17.4.0.39

Installation Directions :
This patch should replace the files “Syncfusion.DocIO.Base.dll” under the following folder.
$system drive: \ Files\Syncfusion\Essential Studio\$Version#\precompiledassemblies\$Version#\4.0
Eg : $system drive:\Program Files\Syncfusion\Essential Studio\17.4.0.39\precompiledassemblies\17.4.0.39\4.0

To automatically run the Assembly Manager, please check the Run assembly manager checkbox option while installing the patch. If this option is unchecked, the patch will replace the assemblies in precompiled assemblies’ folder only. Then, you will have to manually copy and paste them to the preferred location or you will have to run the Syncfusion Assembly Manager application (available from the Syncfusion Dashboard, installed as a shortcut in the Application menu) to re-install assemblies.

Note:
To change how you receive bug fixes, ask your license management portal admin to change your project’s patch delivery mode.
https://www.syncfusion.com/account/license

Disclaimer:
Please note that we have created this patch for version 17.4.0.39 specifically to resolve the issue reported in the forum 150503.

If you have received other patches for the same version for other products, please apply all patches in the order received.

This fix will be included in our 2020 Volume 1 release which will be available in March 2020.

Please let us know if you have any other questions.

Regards,
Manikandan Ravichandran.
 


AtliDev
Replied On February 6, 2020 09:57 AM UTC

Hi,

i come back to you to have an explantation for the first case that doesn't work correctly ( thread of junuary 9 2020 )
i give attached the example , for test

i don't have the good width of cell , ( difference between word9 et docio ) 

but when i change the property of table to fixed width  , the result is correcte 
there is a difference between fixed and percentage in the width property of table 

i don't know the problem. i let u test and see

for the patch , is work correcty


thanks


Attachment: test_f4c8fdd8.rar

Manikandan Ravichandran [Syncfusion]
Replied On February 7, 2020 08:52 AM UTC

Hi AtliDev,

Thank you for your update.

We have reproduced the reported problem “Cell width is differernt in Fixed width and percentage width”
from our side. We will validate the reported problem and update you more details about this on 11th February 2020.

Please let us know if you have any other questions.

Regards,
Manikandan Ravichandran


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon