I am having an issue with Aspose MailMerge. We have a table that is inside of a textbox. The text is set to align starting outside of the table cells. The PDF is supposed to clip the text rendering outside of the textbox. This is what we see happen in Word and in older versions of Aspose.Words. The new version of Aspose.Words does not clip the text rendering and instead overflows the text outside of the table cell. I have attached the Word document and output PDF. Here is the code to replicate the issue. Please advise what we can do to fix this issue?
Aspose.Words.License license = new Aspose.Words.License();
license.SetLicense(@"c:\Aspose\Aspose.Total.NET.lic");
// Load the document from disk.
Aspose.Words.Document doc = new Aspose.Words.Document(@"c:\temp\OutOfCell.docx");
// create a dataset to mail merge against
DataSet ds = new DataSet();
DataTable dt = new DataTable("Test");
dt.Columns.Add("Insert1");
dt.Columns.Add("Insert2");
dt.Columns.Add("Insert3");
dt.Columns.Add("Insert4");
// Add a row to the DataTable.
DataRow dr = dt.NewRow();
dr["Insert1"] = ". test1";
dr["Insert2"] = ". test2";
dr["Insert3"] = "test3 .";
dr["Insert4"] = "test4 .";
dt.Rows.Add(dr); // <-- This was missing
// Add the DataTable to the DataSet.
ds.Tables.Add(dt);
// Perform mail merge.
doc.MailMerge.Execute(ds.Tables[0]);
// save as PDF
doc.Save(@"C:\Temp\OutOfCell.pdf", Aspose.Words.SaveFormat.Pdf);
OutOfCell.pdf (15.6 KB)
OutOfCell.docx (18.0 KB)