So for what does
So for what does
You are in right saying SaveOptions.TempFolder specifies the folder for temporary files used when saving to a DOC or DOCX file. So it isn’t the location for the created PDF file! BUT it is the location for necessary TMP files!
Aspose.Words for Java uses a temporary directory on your machine that is specified via java.io.tmpdir
system property. Aspose.Words writes temporary files and removes them
as soon as rendering is completed. “java.io.tmpdir” is a standard Java
system property which is also used by the disk-based storage policies.
It determines where the JVM writes temporary files. You can change the
value of this property for example by
using System.setProperty(“java.io.tmpdir”, "/mytempdir) method. I hope,
Please let us know if you have any more queries.
When Aspose.Words saves a document, it needs to create temporary internal structures. By default, these internal structures are created in memory and the memory usage spikes for a short period while the document is being saved. When saving is complete, the memory is freed and reclaimed by the garbage collector.
If you are saving a very large document (thousands of pages) and/or processing many documents at the same time, then the memory spike during saving can be significant enough to cause the system to throw OutOfMemoryException. Specifying a temporary folder using TempFolder will cause Aspose.Words to keep the internal structures in temporary files instead of memory. It reduces the memory usage during saving, but will decrease the save performance.
The folder must exist and be writable, otherwise an exception will be thrown. Aspose.Words automatically deletes all temporary files when saving is complete.