What sort of caching and background thread/processes does PDFNet use on a server?

Caching:

To avoid memory exhaustion, by default, PDFNet writes streams (e.g. fonts, images, page graphic commands) to disk in temporary files.

To control the folder use this API
com.pdftron.pdf.PDFNet.setDefaultDiskCachingEnabled

And if enabled use this API to set the folder path.
com.pdftron.pdf.PDFNet.setTempPath

There is also a persistent cache of optimized graphic streams for PDF files. This is usually only created when using our interactive viewer classes to view the PDF, but can also be triggered during some conversions from PDF to other file formats.

You can turn that off with
com.pdftron.pdf.PDFNet.SetViewerCache(0, false)

And if enabled you can control the folder path with
com.pdftron.pdf.PDFNet.SetPersistenCachePath

Threads / Processes:

Generally, threading is controlled by you, the client. There are some exceptions though, and background threads can be launched for the following features.

  1. Font loading.

  2. Generation and caching of optimized graphic streams (See SetViewerCache and SetPersistenCachePath above).

  3. PDFViewCtrl or PDFViewWPF viewer classes. These are fully interactive viewers that move all the rendering, and other operations, to background threads. This class would not normally be used on server.

PDFNet will also generate child process if you use any of our external modules, which are:

  • HTML2PDF
  • AdvancedImagingModule
  • StructuredOutputModule
  • CAD2PDFModule
  • OCRModule

Finally, on Windows server/desktop, there are some additional cases where if you are trying to convert files to PDF (e.g. DOCX to PDF) where PDFNet might instantiate MS Word, or other 3rd party applications. This would all be under the com.pdftron.pdf.Convert.ToPdf function call, and only on Windows OS.

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:Forums: