PdfViewCtrl Memory consumption


I'm using the PDFView control from PDFnet.

I have version (official kit)
I can instantiate 12 controls, then the application crashes with 'bad allocation'

With a previous version ( I can instantiate more then 25 controls...

I tried it with the download I found in this forum ( but this one gives me
Message: Not enough storage is available to process this command.
Conditional expression: ip::interprocess_exception
Filename: MappedFile.cpp
Function: trn::Filters::MappingManager::CreateMapping
Linenumber: 237

I reduced the code to basically:

Dim _PdfDoc As PDFDoc
Private Sub Form2_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
_PdfDoc = New PDFDoc("C:\temp\20140716_20140716_STATION1_BATCH261_11531.pdf")
PdfViewCtrl1.SetDoc(_PdfDoc) PdfViewCtrl1.SetPagePresentationMode(PDFViewCtrl.PagePresentationMode.e_single_page)
End Sub

Am I doing something wrong ?
Thanks in advance
Dirk Rijmenants

Newer versions of PDFNet are taking advantage of disk caching to speed-up rendering (this is especially visible on large complex documents such as CAD files). You can completely disable viewercaching with:

PDFNet.SetViewerCache(0, false)

or you can adjust it to some other more suitable levels.

In order to all generation of multi-gigabyte files PDFNet is also caching files to disk during PDF generation or editing. If you want to prevent any type of disk caching (e.g. you are concerned re: leaving any traces of data on disk) use PDFNet.SetDefaultDiskCachingEnabled(false).


I disabled the viewercaching: PDFNet.SetViewerCache(0,False)
And now I can instantiate more than 30 viewers without ‘getting into trouble’
I’m using the version posted in this forum, which displays ‘DEMO’ on the viewer. Is there a way to get an official version of this library ?


which displays ‘DEMO’ on the viewer. Is there a way to get an official version of this library ?

You can obtain the license via https://www.pdftron.com/licensing