Do you own a Debenu Quick PDF Library 12/11/10/9/8/7? Upgrade to Debenu Quick PDF Library 13!

Foxit Quick PDF Library

Frequently Asked Question:

Return to FAQ Index

Using C# and the DLL edition of Quick PDF Library

Question

Can you provide some sample code for how the DLL edition of Quick PDF Library works with C# within Visual Studio?

Answer

This is a short demo of how to use the DLL edition of Quick PDF Library with C#.

// Add the namespaces (first you'll need to. You will need to add a reference to the
// C# import file for the DLL edition.

using System.IO;
using QuickPDFDLL0717;

// Put a button onto the form and add this code to the Click event:

privatevoidbutton1_Click(objectsender,EventArgse)
{
// Create an instance of the class and give it the path to the DLL
PDFLibrary qp = new PDFLibrary("...path where the DLL is stored...\\QuickPDFDLL0717.dll");

// Check if the DLL was loaded successfully
if(qp.LibraryLoaded())
{
// Check the license key
if(qp.UnlockKey("...licensekeyhere...")==1)
{
// Draw some text on the PDF
qp.DrawText(100,500,"Hello world from C#");

// Save the new document to disk
qp.SaveToFile("c:\\HelloCSharpDLLWorldWorld.pdf");
}
}
}

© 2015 Debenu & Foxit. All rights reserved. AboutBuyContactBlogNewsletterSupportFAQProduct UpdatesForum