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

Free Support Forum - aspose.com

Document Conversion to PDF with a large file. about 50 MB

Hi, I read your thread about a large file conversion to PDF and in that
thread you mentioned that words need 10 times more memory than original
file and it needs to create 2 models.

I have a question regarding this.
Does this mean if I have 50mb file it requires the same amount memory as creating a 50 * 10 * 2 = 1000mb (1GB ) document file?

I’m not sure how much memory that is but in my local environment, I have 8GB RAM and took 7.38 GB to do the below code.

Does this sounds about right? or do you think it shouldn’t take this much of RAM?

The
reason why I am asking is that my company probably want to know
baseline for how big the file size that our client can convert based on
RAM we have on our servers.

Please let me know the answer. Thank you.
Regards.

// open the word document
Aspose.Words.LoadOptions options = new Aspose.Words.LoadOptions();
options.Encoding = Encoding.UTF8;
Aspose.Words.Document WordDocument = new Aspose.Words.Document(sourceFile, options);



// save the word document to PDF
WordDocument.Save(destinationFile, Aspose.Words.SaveFormat.Pdf);

Hi Chikako,


Thanks for your inquiry. The memory usage is
completely dependent on document size and document complexity.

In terms of memory, Aspose.Words does not have any limitations. If you’re loading huge Word documents into Aspose.Words’ DOM, more memory would be required. This is because during processing, the document needs to be held wholly in memory.

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).

Hi Chikako,

Thanks for your inquiry via email. It is quite difficult to answer such questions because performance and memory usage all depend on complexity and size of the documents you are generating. While 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.

Please note that the process of building layout model is
not linear; it may take a minute to render one page and may take a few
seconds to render 100 pages. Also, Aspose.Words has to create APS (Aspose Page Specification)
model in memory and this may again eat some more time for some
documents. Rest assured, we’re always working on improving performance;
but, rendering will be always running slower than simple saving to flow
formats.