How do I disable generation of temp files (e.g. cache)?

Q:

While opening a PDF to view, a temporary file is created at - “/data/data/com.pdftron.pdfnet.demo.pdfviewctrl/cache/”. Attached one such sample file for your perusal. It is critical for our app to not have any File I/O being performed without our notice. So, Is it possible to share the details that are present in this file ? Are there any other similar File I/O operations performed while viewing PDF ? Is there anyway to disable them ?

A:

The cache file is used to speed-up viewing performance (e.g. for files with huge images, complex cad drawings). Without cache PDFNet would need to render each page from scratch which may negatively performance on large files. Stuff will still work … just not as fast as with cache.

You can prevent any temporary/cache file from being created with:
PDFDoc.EnableDiskCaching(false)

Btw. if you need more control over the temp file paths, you can use the following methods just after calling PDFNet.initialize():

PDFNet.setTempPath();

PDFNet.setPersistentTempPath();