Modifying the existing template

Hi, I'm evaluating Aspose words java api. We have a pre defined template with all the place holders. At run time, we would be updating the place holders with the data. Based on the data we would adding rows to tables, deleting tables etc. We would be inserting html content in one of the cells in a table, using documentbuilder inserthtml. this is inserting the data but page break is not taking place. Due to this, the whole paragraph/data is sliding to next page and not the entire data is visible.

Here is the code snippet.

Document doc = new Document("Template.docx");

String htmlText = " Land-locked and tucked away in southeastern Europe, Moldova's
"String htmlText = " Land-locked and tucked away in southeastern Europe, Moldova's
";

doc.getRange().replace("cell00", "232", false, true);
doc.getRange().replace("cell01", "test", false, true);
Table table = (Table)doc.getChild(NodeType.TABLE, 8, true);
Summary summary = getSummary();
updateSumamry(doc, table, summary);

DocumentBuilder builder = new DocumentBuilder(doc);
builder.moveToCell(10, 0, 0, -1);

builder.insertHtml(htmlText);

Any help is appreciated.

Thanks & Regards

Sreekanth

Hi Sreekanth,


Thanks for your inquiry. To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input Word document.
  • Aspose.Words generated output document which shows the undesired behavior.
  • Your expected document which shows the correct output. Please create this document using Microsoft Word.
  • Please create a standalone (runnable) Java application that helps us reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we’ll start investigation into your issue and provide you more information.

Best regards,