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

Can I use Quick PDF Library with Borland C++ Builder 3?

Question

Please let me know if I can use Quick PDF Library with Borland C++ Builder 3?

Answer

Yes, you can. Here are the steps required to get Quick PDF Library working with Borland C++ Builder 3:

  1. Extract Sample/CPlusPlus files
  2. Copy QuickPDFDLL0717.dll, QuickPDFDLL0717.cpp, and QuickPDFDLL0717.h to the project directory
  3. In the project file, select Project/Add to Project... and include QuickPDFDLL0717.cpp in the project

Add the following code to the source and your ready to go:

include "QuickPDFDLL0717.h"

void __fastcall TfrmForm::btnOpenPDFClick(TObject *Sender)
{

// Declare and load Quick PDF Library DLL

QuickPDFDLL0717 
QP("C:\dll_location_path_name_here\QuickPDFDLL0717.dll");

// Library key

std::string strLicenseKey = "your_license_key_here";

// PDF output filename

std::string strFileName = "hello-world.pdf";

// Display message containing the library version
std::string strMessage = ("Quick PDF Library Hello World 
sample");
strMessage.append("\n");
strMessage.append("Library version: " + QP.LibraryVersion());

// Unlock the library

int iResult = QP.UnlockKey(strLicenseKey);
if(iResult == 1)
{
strMessage = "\n";
strMessage = "Valid license key: " + QP.LibraryVersion();

// Draw the 'Hello World' text on the PDF page

QP.DrawText(100, 500, "Hello world from C++");

// Attempt to save the file
  if(QP.SaveToFile(strFileName) == 1)
  {

// Display message that the 'Hello Word' file has been 
written successfully
}
  else
  {

// Display cannot write to file message
}
}
  else
  {

// Display invalid license key message
}
}

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