We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

System out of memory

I am producing a microsoft document using aspose.word for .net. I am using the temporary liscence. I can produce the document fine on my local env. However, when we run it with release mode on our test env, I get system out of memory errors. Please advise

Hello

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. Could you please attach your input document here for testing? I will check the problem on my side and provide you more information.
Please make sure you use Aspose.Words 9.1.0 version in your application. maybe, you missed to update a reference in your test application.

Best regards,

The input is coming from a database. I have attached the final product. Hopefully it will help

Hi Tammy,

Thanks for the additional information. However I was unable to reproduce the issue on my side. We need to know further information about what you are doing in your code that you are using to generate the document to further try diagnose the issue. Are you able to post the code you are using?

Also did you check Andrey’s suggestion about whether the reference has been updated to the new version? What are the specs of your test environment computer?

Thanks,

Hi,

This is the first time we are using aspose.word thus we have the latet reference. I have attached the code. Thanks for looking at this. I am very happy with the quality of the product aspose.word produces. I just have to give my manager a "warm and fuzzy" it works completely before we spend the $$$ for the liscence

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for additional information. I looked through your code. Why do you save document several times? Here is snippet of your code:

protected void ExportToWord_Click(object sender, EventArgs e)

{

try

{

using (MemoryStream m = new MemoryStream())

{

Aspose.Words.License license = new Aspose.Words.License();

license.SetLicense("../Aspose.Words.lic");

Aspose.Words.Document document = new Aspose.Words.Document();

document.RemoveAllChildren();

document.Save(m, SaveFormat.Doc);

DocumentBuilder builder = new DocumentBuilder(document);

builder.MoveToHeaderFooter(Aspose.Words.HeaderFooterType.FooterPrimary);

builder.ParagraphFormat.Alignment = ParagraphAlignment.Right;

builder.InsertField("PAGE", "");

builder.Document.Save(m, SaveFormat.Doc);

builder.MoveToDocumentStart();

builder.Document.Save(m, SaveFormat.Doc);

using (PDMWorkSpecCollection records = new PDMWorkSpecCollection())

{

PDMWorkSpec workSpec = records.GetRecord(this.WSComboxSelectedItemId);

AddPDMWorkSpecCoverPage(m, document, workSpec);

AddPDMWorkSpecChangePage(m, document, workSpec);

AddPDMWorkSpecTableOfContents(m, document, workSpec);

AddPDMWorkSpecSafetySummarySection(m, document, workSpec);

AddPDMWorkSpecSections(m, document, workSpec);

Aspose.Words.HeaderFooter footera = new Aspose.Words.HeaderFooter(document, HeaderFooterType.FooterPrimary);

document.UpdateFields();

document.UpdatePageLayout();

document.Save(m, SaveFormat.Doc);

}

Response.ContentType = "application/word";

Response.AddHeader("Content-Disposition", "attachment; filename=" + this.WSComboBox.SelectedItem.Text + ".doc");

Response.OutputStream.Write(m.GetBuffer(), 0, m.GetBuffer().Length);

Response.OutputStream.Flush();

Response.OutputStream.Close();

}

}

catch (Exception ex)

{

LcmpLog.LogError(ex);

string message = ResourceBinder.Global.Lookup<string>(ResourceBinder.GlobalKeys.GenericExportErrorMessageKey);

Response.Write(message);

}

}

Here you save document four times, but you need to save document only once just before sending it into the client browser. Please try removing redundant Save operations in your code and check whether this helps.

Best regards.

I have taken the saves out as suggested. Now the document is being truncated. Could I possibly have a dll that “renders” a complete document with the trial water mark? I need to have proof that aspose.word can handle to document of the required size. I have attached both the truncate document and the full document.

Hi Tammy,

The .DLL you have includes all the full functionality of Aspose.Words. Without an license the evaluation watermarks are added and content are truncated at a certain length. You can request a 30 day temporary license to remove these limitations from here.

Thanks,

Requested tempory 30 day liscence. Received the attach file. Now receiving error - root element is missing

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for additional information. The file you attached is just an empty txt file. Please try requesting another license file.

Best regards.

With much frustration, I have been working with the sales team, and I am continously sent a blank file. I would appreciate a decent tempory liscence from the dev team. One of the dev team must have a liscence off of their test box. I am not being moved off of this task until I get this issue solved. Please help

Hi Tammy,

I'm afraid the development team dont keep any temporary licenses. You will need to resolve this with the sales team. Most likely if you post your issue on the Purchases forum too you may get some further help there.

Thanks,

We have worked through all of our issues. We will be upgrading our aspose liscence to the full suite on Monday. Thanks to all who helped me with my issues.