Some test text!

Search
Hamburger Icon

Nodejs / FAQ / How do I PDFNet initialize with multiple clients concurrently?

How do I PDFNet initialize with multiple clients concurrently?

The initialize method should be called in your application start-up (such as main(), OnAppStart(), DLLMain(), etc. - depending on our application type and development platform).

In case you don't have such a start-up method, you can call initialize multiple times and PDFNet will make sure that it is initialized only once. You only need to make sure that it is called before any other PDFNet method.

// Use runWithCleanup instead of initialize
// PDFNet initialize is called within runWithCleanup
// runWithCleanup will also perform automatic memory management
PDFNet.runWithCleanup(callback, "Insert commercial license key here after purchase");

// Optional alternative to call initialize directly 
PDFNet.initialize("Insert commercial license key here after purchase");

Once initialized, be sure to lock the document when working in a multi-threaded environment.

Get the answers you need: Chat with us