I have a large (31MB) file that I am trying to convert to PDF:
var pdfDoc = new com.aspose.words.Document(new java.io.ByteArrayInputStream(qie.base64DecodeToBytes(<Base64RTF>)));
pdfDoc.save(path, com.aspose.words.SaveFormat.PDF);
But I get a Heap Space error. I have tried to use the following code to optimise
PdfSaveOptions = new com.aspose.words.DocSaveOptions();
PdfSaveOptions.setSaveFormat(com.aspose.words.SaveFormat.pdf);
PdfSaveOptions.setTempFolder("C:\Temp");
pdfDoc.save(path, PdfSaveOptions);
However, I now get another error about PDF type not being allowed:
java.lang.IllegalArgumentException: An invalid SaveFormat for this options type was chosen.
I no longer get the original error, but now get a HeapSpace error despite the PdfSaveOptions. Is there any way to configure the amount of memory allocated to Aspose?