Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
![]() |
Cannot get QuickPDF library to work |
Post Reply ![]() |
Author | |
RandyJ ![]() Beginner ![]() Joined: 03 Jan 13 Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() Posted: 03 Jan 13 at 6:56PM |
I am an employee for a company looking to license a PDF library for use in our product and I have been assigned the task of evaluating different libraries to determine which we want to use.
QuickPDF seems to be the best suit for our needs thanks to it having support for Device Context handles, which would allow us to add native printing to PDF with very little modification to our existing code. However, I have run into some issues with getting the actual library itself to run. My development environment is Visual C++ 6 and I have tried both the Lib and DLL versions of the library to no avail. With the Lib version, I successfully added the library and .h file to the project and wrote some test code around it, but the application crashes on this line DEBENUPDFLIBRARYLIB0912_DllMain(GetModuleHandle(NULL), DLL_PROCESS_ATTACH, NULL); I attempted to use the DLL version, but cannot even get the application to compile, using either the standard of MFC .h and .cpp files. With the standard version, I get an error about precompiled headers, and after I added #include "stdafx.h" I began to get an error with this line DebenuPDFLibraryDLL0912 QP("DebenuPDFLibraryDLL0912.dll"); where the CString cannot be cast to what the constructor expects. With the MFC version, it will not even compile due to CStringW not being a known identifier. Any input would be appreciated as to how to get this working. |
|
![]() |
|
Wheeley ![]() Senior Member ![]() ![]() Joined: 30 Oct 05 Location: United States Status: Offline Points: 146 |
![]() ![]() ![]() ![]() ![]() |
I would say look here for examples.
http://www.quickpdflibrary.com/help/getting-started.php Hope it helps Wheeley |
|
![]() |
|
AndrewC ![]() Moderator Group ![]() ![]() Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
![]() ![]() ![]() ![]() ![]() |
Visual C++ v6 is getting very old and I suspect it doesn't fully support Unicode. QPL and the CPP files are expecting the EXE to be compiled as a Unicode app which uses Unicode strings internally instead of 8 bit strings.
I am wondering if the following code works ? Note the 'L' at the front of the string. DebenuPDFLibraryDLL0912 QP(L"DebenuPDFLibraryDLL0912.dll");
Another option is to try using the .h file from the 'DLL\Import\C' directory and then use the 'A' functions such as DPLUnlockKeyA DPLLoadFromFileA DPLRenderPageToFileA as these functions take 8bit strings (char *) Andrew. |
|
![]() |
|
RandyJ ![]() Beginner ![]() Joined: 03 Jan 13 Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() |
That fixes the error with the constructor, however the other functions are "undeclared identifiers". It is difficult to determine the correct way of getting this to work because the documentation is inconsistant.
From the quick start guide: int InstanceID; InstanceID = DPLCreateLibrary(); if (DPLUnlockKey(InstanceID, "your license key") == 1) { DPLDrawText(InstanceID, 100, 500, "Hello world"); DPLSaveToFile(InstanceID, "C:\Docs\HelloFromDLL.pdf"); } DPLReleaseLibrary(InstanceID); from the example: // Declare and load Quick PDF Library DLL DebenuPDFLibraryDLL0912 QP("DebenuPDFLibraryDLL0912.dll"); // Library key CStringW strLicenseKey = L"INSERT_LICENSE_KEY_HERE"; // PDF output filename CStringW strFileName = L"hello-world.pdf"; // Display message containing the library version CStringW strMessage = L"Quick PDF Library Hello World sample"; strMessage += L"\n"; strMessage += L"Library version: " + QP.LibraryVersion(); // Unlock the library int iResult = QP.UnlockKey(strLicenseKey); if (iResult == 1) { |
|
![]() |
|
RandyJ ![]() Beginner ![]() Joined: 03 Jan 13 Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() |
Believe I got it working. I used the non MFC c++ .h and .cpp (with a small modification) and the L to cast the string to unicode.
|
|
![]() |
|
DezhiF ![]() Beginner ![]() Joined: 21 May 13 Location: MA Status: Offline Points: 2 |
![]() ![]() ![]() ![]() ![]() |
I have this exact problem with Lib version, my application
crashes on this line: DEBENUPDFLIBRARYLIB0912_DllMain(GetModuleHandle(NULL), DLL_PROCESS_ATTACH, NULL); This is the error we get: Unhandled exception at 0x770407e4 in cadracad.exe: 0xC0000025: Windows cannot continue from this exception. We are attempting to call this from our C code which is not built with Unicode support. We are using Visual Studio 2008 compilers. Is it possible to do what we are attempting? Thanks! Dezhi Fan |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store