Out of Memory or UseZip64WhenSaving while saving files

We are evaluating your 30days full word dll (v. 13.9.0.0) to understand if it can be useful for our Clients needs.

We made a little program that use a word template with IF condition, INCLUDEPICTURE, and MERGEFIELD replacements.

We tried to use the MailMerge function with the word template and a 10000 rows datatable (the actual need is to obtain documents of more than 25000 pages), but we had a problem of Out of Memory.

Our machine is virtualized and uses 2GB of ram.

We solved the problem by creating a cycle that uses a filtered dataview of 500 lines at a time, but doing so we have created a number of doc files that need to be joined together.

Using another cycle we use your AppendDocument function to create a new big aspose document that contains all previous doc files.

After that we use the Save function to create a doc, docx or pdf, but on the 2Gb ram machine we get the Out of Memory problem even using the Temp folder setting.

After moving everything an a 4Gb ram virtualized machine we get another error during the Save function: "The number of entries is 65535 or greater. Consider setting the UseZip64WhenSaving property on the ZipFile instance".

How is possible to resolve the Out of Memory problem or where can we set the UseZip64WhenSaving property?

Thanks

Hi Stefano,


Thanks for your inquiry. It would be great if you please share following detail for investigation purposes.

  • Please attach your input Word document.
  • Please

    create a standalone/runnable simple application (for example a Console
    Application Project) that demonstrates the code you used to generate
    your output document

  • Please attach the output Word file that shows the undesired behavior.
  • Please
    attach your target Word document showing the desired behavior. You can
    use Microsoft Word to create your target Word document. I will
    investigate as to how you are expecting your final document be generated
    like.

Unfortunately,
it is difficult to say what the problem is without the Document(s) and
simplified application. We need your Document(s) and simple project to
reproduce the problem. As soon as you get these pieces of information to
us we’ll start our investigation into your issue.

Thanks for your answer.

We saved our test template with the image compression enabled and the UseZip64WhenSaving problem has gone, but if we tried to generate a file with 15000 pages or more we get another error, something like "unexpected end of file at position ....".

To replicate our test you have to choose 15000 rows (each row correspond to a page) and 500 rows for file.

Our demo program generates 30 docx files (500 pages each), then it use the AppendDocument function to to create a single document that can be saved with the extention .doc, docx or pdf.

Attached there is the demo project, we removed our 30days license from the zip file and inside there is our docTemplate and some logos used for test.

Thank you.

Hi Stefano,


Thanks for sharing the detail. I have logged a new Task in our issue tracking system as WORDSNET-9156 to investigate the shared issue. We will investigate your issue at our end and will post the results here for
your kind reference asap.


Thank you for your patience and understanding.

Hi Stefano,


Thanks
for your patience. I have tested the scenario and have not found the
shared issue while using latest version of Aspose.Words for .NET 13.9.0. I have tested the scenario at Windows 7, Core i7 - 8GB Ram.
Please see the attached image for detail.

Please share the following detail for investigation purposes.

What environment are you running on?
  • OS (Windows Version)
  • Architecture (32 / 64 bit)
  • .NET Framework version

We will prepare the required platform to
simulate the environment as of yours. As soon as everything is setup,
we will test the issue at our end and will post the results here for
your kind reference.

Moreover, It is quite difficult to answer such
questions because CPU performance and memory usage all depend on
complexity and size of the documents you are loading/generating. Usually, Aspose.Words needs 10 times more memory
than the original document size to build it’s DOM in the memory and when
it comes to rendering a document to fixed page formats (e.g. PDF),
Aspose.Words needs to build two model in the memory – one for document
and the other for rendered document.

Hi, we changed our test machine using a Windows 7 64 bit, 8 Gb of Ram, framework 4.0.

Today we made some other test:

we compiled the program in RELEASE version and choosing 15000 rows (500 each file) we get the error "Unespected end of file while parsing Name has occurred..." (see attachment "Aspose_error (RELEASE 15000 rows).jpg")

Then we compiled the program in DEBUG version and choosing 15000 rows (500 each file) we were able to generate correctly the docx document.

Then we used the DEBUG version of the program to generate a 20000 rows (500 each file) file and we get the message "The number of entries is 65535 or greater. Consider setting UseZip64WhenSaving property on the zip file instance" (see attachment "Aspose_error (DEBUG 20000 rows).jpg")


Hi Stefano,

I have managed to reproduce the exception (“Unespected end of file while parsing Name has occurred…”) at my side. I have logged this issue as WORDSNET-9168 in our issue tracking system. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

Regarding following exception, I am working on it and will update you soon.

The number of entries is 65535 or greater. Consider setting UseZip64WhenSaving property on the zip file instance"

We apologize for your inconvenience.

Thanks for your support.


We’ll waiting for a solution on this forum thread hoping it arrives before our 30 days license expires.


Hi Stefano,

Thanks for your inquiry. I would like to share with you that issues are
addressed and resolved based on first come first serve basis. Currently,
your issue is pending for analysis and is in the queue. I am afraid, I
cannot provide you any reliable estimate at the moment. Once your issue
is analyzed, we will then be able to provide you an estimate.


I have not managed to reproduce the following exception. Every time the exception (“Unexpected end of file while parsing Name has occurred…”) is thrown by using your code.

The number of entries is 65535 or greater. Consider setting UseZip64WhenSaving property on the zip file instance"
Thank you for your patience and understanding.

We get first error (Unespected end of file while parsing Name has occurred…”) when we compile in RELEASE mode.


Have you tried compiling in DEBUG mode?

When we compile in DEBUG mode (using 20000 rows) we get the second error (The number of entries is 65535 or greater. Consider setting UseZip64WhenSaving property on the zip file instance).

Let me know if you can reproduce even the second error.

Thanks


Hi Stefano,

Thanks for your inquiry. I have tested the scenario in Debug mode (using 20000 records of DataTable) and have and not found the exception (The number of entries is 65535 or greater. Consider setting UseZip64WhenSaving property on the zip file instance).

Please see the attached image for detail. Perhapes, you are using different code or document. Please make sure that you have shared the same application and document in this thread. I will then investigate the issue on my side again and provide you more information.

Hi Stefano,

Thanks for your patience. It is to inform you that our product team has completed the work on issue (WORDSNET-9168) and has come to a conclusion that this issue and the undesired behavior you're observing is actually not a bug in Aspose.Words. So, we are closing this issue as 'Not a Bug'.