In order to use the ActiveX edition of Debenu Quick PDF Library you first need to register it on your machine. To register it simply type the following into the command line (Start > Run > CMD):

regsvr32.exe "C:\Program Files\Debenu\PDF Library\ActiveX\DebenuPDFLibraryAX0916.dll"

If necessary, update the path to the ActiveX edition of the PDF library. Once you’ve received confirmation via a message box that the registration was successfully, you may proceed.

Now that you’ve registered the ActiveX edition of Debenu Quick PDF Library, open Visual Studio with a new or exist solution and add the COM reference for the library by selecting:

Project > Add Reference > COM > Debenu Quick PDF Library 9.14

That’s all the setting up you need to do — you’re ready to start coding. Here’s a short example of how to initiate the library object and perform some basic operations.

Public Class Form1
 
Private Sub btnHelloWorld_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) 
Handles btnHelloWorld.Click
Dim ClassName
Dim LicenseKey
 
ClassName = "DebenuPDFLibraryAX0916.PDFLibrary"
LicenseKey = "..." //'Insert your trial or commercial license key here
 
Dim DPL
Dim Result
 
DPL = CreateObject(ClassName)
Result = DPL.UnlockKey(LicenseKey)
If Result = 1 Then
 
DPL.SetOrigin(1)
DPL.DrawText(100, 100, "Hello Visual Basic! This text has been drawn using the DrawText 
function.")
DPL.SaveToFile("Hello_World.pdf")
 
Else
MsgBox("- Invalid license key -")
End If
DPL = Nothing
End Sub
End Class

Private Sub btnHelloWorld_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btnHelloWorld.Click
Dim ClassName
Dim LicenseKey

ClassName = "DebenuPDFLibraryAX0916.PDFLibrary"
LicenseKey = "..." //'Insert your trial or commercial license key here

Dim DPL
Dim Result

DPL = CreateObject(ClassName)
Result = DPL.UnlockKey(LicenseKey)
If Result = 1 Then

DPL.SetOrigin(1)
DPL.DrawText(100, 100, "Hello Visual Basic! This text has been drawn using the DrawText
function.")
DPL.SaveToFile("Hello_World.pdf")

Else
MsgBox("- Invalid license key -")
End If
DPL = Nothing
End Sub
End Class