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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Cannot get QuickPDF library to work
  FAQ FAQ  Forum Search   Register Register  Login Login

Cannot get QuickPDF library to work

 Post Reply Post Reply
Author
Message
RandyJ View Drop Down
Beginner
Beginner


Joined: 03 Jan 13
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote RandyJ Quote  Post ReplyReply Direct Link To This Post Topic: Cannot get QuickPDF library to work
    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.


Back to Top
Wheeley View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 Oct 05
Location: United States
Status: Offline
Points: 146
Post Options Post Options   Thanks (0) Thanks(0)   Quote Wheeley Quote  Post ReplyReply Direct Link To This Post Posted: 03 Jan 13 at 8:28PM
I would say look here for examples.

http://www.quickpdflibrary.com/help/getting-started.php

Hope it helps
Wheeley
Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 05 Jan 13 at 10:35AM
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.
Back to Top
RandyJ View Drop Down
Beginner
Beginner


Joined: 03 Jan 13
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote RandyJ Quote  Post ReplyReply Direct Link To This Post Posted: 07 Jan 13 at 2:26PM
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)
    {
Back to Top
RandyJ View Drop Down
Beginner
Beginner


Joined: 03 Jan 13
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote RandyJ Quote  Post ReplyReply Direct Link To This Post Posted: 07 Jan 13 at 4:57PM
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. 
Back to Top
DezhiF View Drop Down
Beginner
Beginner


Joined: 21 May 13
Location: MA
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote DezhiF Quote  Post ReplyReply Direct Link To This Post Posted: 23 May 13 at 3:06PM
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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store