Hello, we are using aspose 26.5.
We have an application we are working to incorporate aspose into. It has a memory limit of 1028MB.
We have found that converting from PDF → .PS using the PSSaveOptions class produces an out of memory error heap error.
We have been testing with two documents, one around 12MB, the other 75MB. I have removed the memory limit from our application in local testing and see the usage in task manager reach 5-8GB.
here is the method that is causing the issues:
private void runPsConversion(String collatedDocPath, String psOutputFilePath) throws IOException {
MemoryExtender.setSwapEnabled(true);
MemoryExtender.isOptimizedMemoryStreamByDefault(true);
try (com.aspose.pdf.Document collatedDoc = new com.aspose.pdf.Document(collatedDocPath)) {
PsSaveOptions options = new PsSaveOptions();
collatedDoc.save(psOutputFilePath, options);
}
MemoryExtender.isOptimizedMemoryStreamByDefault(false);
MemoryExtender.setSwapEnabled(false);
}
We have tried a number of other memory saving methods, such as the optimization methods within the Document class, but those produce high memory usage as well.
Is there any recommendation for a low-memory usage implementation that we can use, while preserving high-quality outputs?