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

79 views
Skip to first unread message

Support

unread,
Dec 4, 2013, 2:20:36 PM12/4/13
to pdfne...@googlegroups.com
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)

Support

unread,
Dec 4, 2013, 3:11:15 PM12/4/13
to
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();

Reply all
Reply to author
Forward
0 new messages