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

Free Support Forum - aspose.com

Document with big size (1.6GB) stucks when save to PDF using Java

Hi, in our customer’s report, they have a massive amount of pictures (2500+) ,up to 1.65Gb. While generating it as HTML format, although it takes a long time, it managed to save. However, while generating as PDF/Docx, it will stuck for a long time and then failed.

Using Api

public SaveOutputParameters save(OutputStream stream, SaveOptions saveOptions) throws Exception {
            zzBL var3 = new zzBL();
            SaveOutputParameters var4 = this.zzZ((zzBJ)var3, (SaveOptions)saveOptions);
            var3.zzZO(0L);
            zz9Z.zzZ(var3, stream);
            return var4;
        }

I just only want to ask if there are any settings on file saving and like this kind of size, how long should it take usually. Sorry I cannot provide the original data to you to reproduce this issue.

Thanks

@windpine

Please note that performance and memory usage all depend on complexity and size of the documents you are generating. If you are 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 a DOM in the memory. So, please increase the memory size of system where you are converting documents.

You can use SaveOptions.TempFolder property to specify the folder for temporary files used when saving to a DOC or DOCX file.

We suggest you please use SaveOptions.MemoryOptimization property to optimize the memory performance. Setting this option to true can significantly decrease memory consumption while saving large documents at the cost of slower saving time. Hope this helps you.