Free Support Forum - aspose.com

Limit conversion of Office's documents

Hello

We convert office’s documents into PDF using Aspose .Net

Some times the input file are big and the conversion use a lot of memory (500 Mo to 3Go). It’s happen often with Excel file with lot of empty columns and lines.

Is there any options to limit the usage of the RAM, or the time needed to convert the file ?
It’s ok if we have a partial output PDF file if it’s a correct PDF file

Thanks

@tparassin,

We need your sample files to evaluate your issue precisely. Please zip your Excel file and other documents where you are finding the memory consumption or performance issue. Also share your sample code that you are using, this will help us test your issue and to figure it out soon.

By the way, if you have so many (unnecessary) empty columns or pages in the workbook, you should remove those empty rows and columns first before rendering to PDF, see the two lines of code for your reference:

worksheet.Cells.DeleteBlankRows();
worksheet.Cells.DeleteBlankColumns();

Moreover, there is no option which could limit the usage of RAM or give you estimated time for conversion.

Hello

Thanks for the answer, we will try this.
There is so many different files that cause trouble that we can’t really do something specific.
We will try to monitor also the process in case of it use to many memory or too much time.

Another question, the option
opt.MemorySetting = MemorySetting.MemoryPreference;
is also a good idea ?

@tparassin,

Yes, this option can minimize the memory usage for large files.