Here are some instructions on how to use the DLL edition of Debenu Quick PDF Library with Visual Basic .NET within Visual Studio. This answer applies to Visual Studio 2003 through to Visual Studio 2012.

To make life easier, the DLL edition of Debenu Quick PDF Library includes an import file for use with Visual Basic. This import file is generally located at if you chose to install Debenu Quick PDF Library in the default location:

  • C:\Program Files (x86)\Debenu\PDF Library\DLL\Import\VB.NET\DebenuPDFLibraryDLL1013.vb

Add this import file to your Visual Basic solution by right-clicking on your solution in the Solution Explorer in Visual Studio and clicking on Add > Existing Item and then selecting the import file. You will then need to call the DebenuPDFLibraryDLL1013 namespace. This will require you to type your projects name and Debenu Quick PDF Library’s namespace. Remember spaces and dashes are replaced with underscores, so it might look something like this:

private void Form1_Load(object sender, EventArgs e)
Imports Hello_World_DLL_Edition.DebenuPDFLibraryDLL1013

Once that’s done, you’re ready to initiate the library and start your work. Here’s a basic example of how to initiate the library and perform some basic operations:

private void Form1_Load(object sender, EventArgs e)
Imports Hello_World_DLL_Edition.DebenuPDFLibraryDLL1013
 
Public Class Form1
Dim DPL As PDFLibrary ' Declaring DPL here lets you access it from all subs
 
Private Sub btnHelloWorld_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) 
Handles btnHelloWorld.Click
 
Dim LicenseKey
Dim Result
 
DPL = New PDFLibrary("DebenuPDFLibraryDLL1013.dll") // 'Update path if necessary
LicenseKey = "..." // 'Insert your trial or commercial license key here
 
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

Public Class Form1
Dim DPL As PDFLibrary ' Declaring DPL here lets you access it from all subs

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

Dim LicenseKey
Dim Result

DPL = New PDFLibrary("DebenuPDFLibraryDLL1013.dll") // 'Update path if necessary
LicenseKey = "..." // 'Insert your trial or commercial license key here

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