@Ajisha To make the engine fill the whole cell rather than a piece of text between opening and closing backColor tags, it is needed to put the closing backColor at the end of the cell, so opening and closing backColor tags to capture the whole cell. For example see the following simple template:
Document doc = new Document("C:\\Temp\\in.docx");
ReportingEngine engine = new ReportingEngine();
engine.BuildReport(doc, new object());
doc.Save("C:\\Temp\\out.docx");
@alexey.noskov I am using the latest version 24.8.0 in aspose.words and using the license aspose.total.net.lic. In this version the aspose.words wraps the text in the table to the next row. However the version 20.8 does not have this issue. Do you have a solution for this?
@Ajisha Could you please attach your input, problematic and expected output documents along with code that will allow us to reproduce the problem? We will check the issue and provide you more information.
@Ajisha There is no defect in Aspose.Words. The table cell in your template is simply too narrow. So the content is wrapped. Here is a simplified document and code that demonstrates this:
Document doc = new Document(@"C:\Temp\in.docx");
ReportingEngine engine = new ReportingEngine();
engine.BuildReport(doc, 4.529, "val");
doc.Save(@"C:\Temp\out.docx");
doc.Save(@"C:\Temp\out.pdf");
As you can see content is wrapped the same in MS Word and in PDF. So Aspose.Words renders the document the same way as MS Word does. in.docx (80.0 KB) out.docx (73.6 KB) out.pdf (88.2 KB)
No, I am afraid without modifying the template, there is no way to resolve this.
The development goal of the Aspose.Words Document Layout Engine is to make it as close to MS Word as possible, rather than maintaining the same rendering results as older versions of Aspose.Words. This means that differences in document layout may occur between older and newer versions due to continuous improvements in the layout engine.
You’re comparing versions 20.8 and 25.3 of Aspose.Words, which represent about 5 years of development. The output produced by the newer version is closer to the results in MS Word. It’s likely that the older version had a bug or a missing feature that, by coincidence, produced the rendering result you expected.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.