To unlock Foxit Quick PDF Library so that it is not limited in anyway you need to use the UnlockKey function with your commercial or trial license key after you have initiated the library.
The UnlockKey function returns a value to indicate whether or not the library could be unlocked:
0 = The library could not be unlocked
1 = The library was unlocked successfully
When using the UnlockKey it’s always a good idea to check the return value of this function so
that you know whether your application is going to work correctly or not. For example:
Dim ClassName Dim LicenseKey Dim FileName ClassName = "DebenuPDFLibraryAX.PDFLibrary" LicenseKey = "..." // INSERT LICENSE KEY HERE FileName = "C:\Hello-World-From-DQPL.pdf" Dim DPL Dim Result Set DPL = CreateObject(ClassName) Result = DPL.UnlockKey(LicenseKey) If Result = 1 Then MsgBox "Library version: " + DPL.LibraryVersion MsgBox (DPL.LicenseInfo) Call DPL.DrawText(100, 500, "Hello world from Visual Basic 6") If DPL.SaveToFile(FileName) = 1 Then MsgBox "File " + FileName + " written successfully." Else MsgBox "Error, file could not be written." End If Else MsgBox "Invalid license key. Please set a valid license key." End If Set DPL = Nothing |
If the library is not successfully unlocked then you will run into various problems which will mean your application won’t work correctly. So again, it’s important to check the return value of the UnlockKey function!