I am creating reports in Aspose.Words, by iterating thru DataTables and then calling builder.Write(String) when its time to right something. I’ve noticed that i get an exception thrown in C# of ‘SystemOutOfMemory’, im using c# 2.0. I noticed that this code ran fine and produced a 33Meg file when my i was 200000 but got the error when i increased the i value up to 300000 (intRowNumber).
Aspose.Word.License license = new Aspose.Word.License();
license.SetLicense(Server.MapPath(@"~\bin") + @"\Aspose.Word.lic");
Aspose.Word.DocumentBuilder builder = new Aspose.Word.DocumentBuilder(doc);
GenerateDoc(Convert.ToInt32(strSearchParameter), builder);
protected void GenerateDoc(int intRowNumber, Aspose.Word.DocumentBuilder builder)
{
for (int i = 0; i < intRowNumber; i++)
{
// 71 characters an sit on one line with my margins with default
builder.Writeln("012345678901234567890123456789012345678901234567890123456789012345678901");
}
}
Does Aspose.Words have maybe an upperbound for file sizes? This computer is a 2.66 Hz on XP Pro SP2 with 4 gigs of RAM if that helps.