We are using Aspose to convert DOC files to PDF files and then to merge the generated PDF files into one PDF file.
When at least one of the DOC files is large (>50 MB) we start getting OutOfMemoryException specially when running the code for the second time.
The code dies Here :
Document doc = new Document(fileName);
doc.Save(fileName + ".pdf", SaveFormat.Pdf); // exactly here
return fileName + ".pdf";
looks like it tries loading the whole file into the memory before converting it to PDF. Is there a way to improve the code to fix this ?
Thanks in advance !