IWTextBox issue after upgrading Synfusion dll

Hello,
We are using IWTextBox from Syncfusion.DocIO.DLS to display State and Year on an image on Word report using DocIO.  

Earlier we were using Synfusion version OLD Version -- 16.3.0.21 .. The IWTextBox was getting aligned properly on the image . 

Please see attachment - (Report Picture 1.PNG)

Recently we upgraded Synfusion to new version  17.4.0.43. The IWTextBox is not getting aligned properly on the image using the same code.

Please see attachment - (Report Picture 2.PNG)

We are using the following code  

Bitmap hsipImage = reportPicture != null ? Resource.HSIP_Cover_2018_WithGoldBorders : Resource.HSIP_Cover_Old;
            using (Bitmap image = hsipImage)
            {
                IWPicture wImage = paragraph.AppendPicture(image);
                wImage.Width = 450f;
                wImage.Height = 575f;
                wImage.VerticalPosition = 5;
                wImage.HorizontalAlignment = ShapeHorizontalAlignment.Center;
                wImage.TextWrappingStyle = TextWrappingStyle.Square;
                wImage.TextWrappingStyle = TextWrappingStyle.InFrontOfText;
                wImage.AlternativeText = reportPicture != null ? string.Format("Cover :{0} Highway Safety Improvement Program {1} Annual Report, Image is: " + reportPicture.AltText + ", Logos are HSIP Logo and DOT Logo", statedescription, fiscalYear) : alternativeText;

                IWTextBox stateTextBox = paragraph.AppendTextBox(275, 40);
                stateTextBox.TextBoxFormat.NoLine = true;
                stateTextBox.TextBoxFormat.HorizontalPosition = 217;
                stateTextBox.TextBoxFormat.VerticalPosition = 30;
                //Add new text to the textbox body
                paragraph = stateTextBox.TextBoxBody.AddParagraph();
                paragraph.AppendText(statedescription.ToUpper());
                paragraph.ApplyStyle("stateDescription");

                var yParagraph = section.AddParagraph();
                IWTextBox yearTxt = yParagraph.AppendTextBox(275, 30);
                yearTxt.TextBoxFormat.NoLine = true;
                yearTxt.TextBoxFormat.HorizontalPosition = 217;
                yearTxt.TextBoxFormat.VerticalPosition = 105;

                paragraph = yearTxt.TextBoxBody.AddParagraph();
                paragraph.AppendText(fiscalYear.ToString() + " ANNUAL REPORT");
                paragraph.ApplyStyle("annualYearStyleReportHeader");

                if (reportPicture != null)
                {
                    var sourceParagraph = section.AddParagraph();
                    IWTextBox sourceTxt = sourceParagraph.AppendTextBox(450, 125);
                    sourceTxt.TextBoxFormat.NoLine = true;
                    sourceTxt.TextBoxFormat.HorizontalPosition = 25;
                    sourceTxt.TextBoxFormat.VerticalPosition = 550;

                    sourceParagraph = sourceTxt.TextBoxBody.AddParagraph();
                    sourceParagraph.AppendHTML(string.Format("{0} {1}", "<b>Photo Source:</b> <br/>", reportPicture.PictureSource));
                    //  sourceParagraph.ApplyStyle("pictureSource");
                }

            }


 Has any method or property being depreciated when Synfusion dll got upgraded. 

I am also attaching the Synfusion Word Reports

Please provide a working sample in Synfusion  new version  17.4.0.43 to display the state and year correctly on the image

Please advice.





Attachment: Report_Picture_b775f5cb.zip

4 Replies

MR Manikandan Ravichandran Syncfusion Team March 5, 2020 09:41 AM UTC

Hi Robin,

Thank you for contacting Syncfusion support.

As you have mentioned, we can also reproduce the reported issue with “TextBox is not getting aligned properly” in the mentioned version v17.4.0.43 but not reproduced in the version v16.3.0.21. Currently, we are validating the reported issue and update you with details on 9th March 2020.

Meanwhile, as a workaround, we suggest you set overlapping property as true for textbox which is added in the word document as mentioned in the following code example.

 
IWTextBox stateTextBox = paragraph.AppendTextBox(275, 40); 
stateTextBox.TextBoxFormat.NoLine = true; 
stateTextBox.TextBoxFormat.HorizontalPosition = 217; 
stateTextBox.TextBoxFormat.VerticalPosition = 30; 
stateTextBox.TextBoxFormat.AllowOverlap = true; 

As per your request, we have prepared a sample to meet your requirement which can be downloaded from the following link.
https://www.syncfusion.com/downloads/support/forum/152170/ze/ASPNetMVC666970431

Please let us know if you have any other questions.

Regards,
Manikandan Ravichandran



MR Manikandan Ravichandran Syncfusion Team March 9, 2020 03:57 PM UTC

Hi Robin,

We have confirmed that the reported issue with “TextBox is not getting aligned properly” is a defect and we have logged a defect report. Since you have been using our weekly release, we will include the fix for this defect in our 2020 Volume 1 Beta release which is estimated to be available on 17th March 2020.

Note: If you require patch for the reported issue in any of our Essential Studio version (except weekly release version), then kindly let us know the currently installed version, so that we can provide a patch in that version based on our SLA policy.

Please let us know if you have any other questions.

Regards,
Manikandan Ravichandran



RK Robin Knight replied to Manikandan Ravichandran March 9, 2020 10:47 PM UTC

Hi Robin,

We have confirmed that the reported issue with “TextBox is not getting aligned properly” is a defect and we have logged a defect report. Since you have been using our weekly release, we will include the fix for this defect in our 2020 Volume 1 Beta release which is estimated to be available on 17th March 2020.

Note: If you require patch for the reported issue in any of our Essential Studio version (except weekly release version), then kindly let us know the currently installed version, so that we can provide a patch in that version based on our SLA policy.

Please let us know if you have any other questions.

Regards,
Manikandan Ravichandran


I am using the workaround which seems to be working

stateTextBox.TextBoxFormat.AllowOverlap = true; 

What code fix will the 17th March 2020 release contain?

Thanks



MR Manikandan Ravichandran Syncfusion Team March 10, 2020 08:53 AM UTC

Hi Robin,

Thank you for your update and confirmation.

Reg – “I am using the workaround which seems to be working”
We are glad to know that the provided workaround solution meets your requirement.

Reg – “What code fix will the 17th March 2020 release contain?”
The 2020 Volume 1 Beta release contains the fix which does not require to use workaround. You can directly add the textboxes without using the mentioned the overlapping property.

 
stateTextBox.TextBoxFormat.AllowOverlap = true;  // no need to set the overlapping property 

Please let us know if you have any other questions.

Regards,
Manikandan Ravichandran
 


Loader.
Up arrow icon