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 > Sample Code
  New Posts New Posts RSS Feed - C++ example
  FAQ FAQ  Forum Search   Register Register  Login Login

C++ example

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


Joined: 20 Apr 19
Location: Colombia
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote hcortesm Quote  Post ReplyReply Direct Link To This Post Topic: C++ example
    Posted: 20 Apr 19 at 1:26AM
Hello, 

I'm so new programming and it's my fisrt time with Debenu QPL. Is there any example I can use to show me the use of the library in C++? I'm working in code blocks right now. The only examples I can find are VS ones.

Thanks
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 20 Apr 19 at 9:10PM
Hi,

using the advances search option above on this page i found this sample from Bob Hall:
http://www.quickpdf.org/forum/forum_posts.asp?TID=535&KW=C%2B%2B&PID=2335&title=visual-c-starter-example-code#2335

Here is the Debenu sample page for the first steps with the library:
https://www.debenu.com/products/development/debenu-pdf-library/help/samples/

Cheers and welcome here,
Ingo

Cheers,
Ingo

Back to Top
hcortesm View Drop Down
Beginner
Beginner


Joined: 20 Apr 19
Location: Colombia
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote hcortesm Quote  Post ReplyReply Direct Link To This Post Posted: 21 Apr 19 at 4:36AM
Thanks for your help. This example is for use under Visual C++ but is not working on code blocks, so I can not make it run. Keep searching. 

Cheers and thanks for the welcome.

Back to Top
tfrost View Drop Down
Senior Member
Senior Member


Joined: 06 Sep 10
Location: UK
Status: Offline
Points: 437
Post Options Post Options   Thanks (0) Thanks(0)   Quote tfrost Quote  Post ReplyReply Direct Link To This Post Posted: 21 Apr 19 at 12:38PM
Post a bit of code here which fails, and tell us what error reports or failure you are seeing. Does it fail to build, fail to run, or not give correct output?  This is a users' forum so someone else here may be able to help (I am familiar with C++ but do not use it with QPDF).  Saying just "doesn't work" gives no opportunity for anyone to suggest what you might try next!
Back to Top
rsi.thyde View Drop Down
Beginner
Beginner


Joined: 18 Nov 19
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote rsi.thyde Quote  Post ReplyReply Direct Link To This Post Posted: 18 Nov 19 at 11:30PM
Greets - resurrecting this a bit; I'm looking for a CPP reference script (instantiate class, unlock api) for QuickPDF; the VS scripts are not GNU CPP, so are not actually that useful to getting GNU CPP going.

The platform target is Debian 9, GCC 6.3 (preferably, but not mandatory) and the library from FoxitQPLLinuxCPP1711.

I have a non-working snippet as my baseline, drawn from various cobbled sources:

#include <iostream>
#include <string>
#include <cstring>
#include <sstream>
#include "Import/CPlusPlus/FoxitQPLLinuxCPP1711.h"
#include "Import/CPlusPlus/FoxitQPLLinuxCPP1711.cpp"

using namespace std;

int main()
{
  wstring pdfkey = "12345";
  wstring mymsg = "Loading result of key ";

  FoxitQPLLinuxCPP1711 qp = new FoxitQPLLinuxCPP1711();
  int result = qp.UnlockKey(pdfkey);

 wcout << mymsg << pdfkey << " ---- " << result << endl;
 return 0;
}

However, it is expecting, I believe, a specifically typed filename in the instantiation call based upon the errors:

testy.cpp:16:54: error: no matching function for call to ‘FoxitQPLLinuxCPP1711::FoxitQPLLinuxCPP1711()’
   FoxitQPLLinuxCPP1711 qp = new FoxitQPLLinuxCPP1711();
                                                      ^
In file included from testy.cpp:7:0:
Import/CPlusPlus/FoxitQPLLinuxCPP1711.cpp:30:1: note: candidate: FoxitQPLLinuxCPP1711::FoxitQPLLinuxCPP1711(const wstring&)
 FoxitQPLLinuxCPP1711::FoxitQPLLinuxCPP1711(const std::wstring& LinuxFileName)
 ^~~~~~~~~~~~~~~~~~~~
Import/CPlusPlus/FoxitQPLLinuxCPP1711.cpp:30:1: note:   candidate expects 1 argument, 0 provided
In file included from testy.cpp:6:0:
Import/CPlusPlus/FoxitQPLLinuxCPP1711.h:174:7: note: candidate: constexpr FoxitQPLLinuxCPP1711::FoxitQPLLinuxCPP1711(const FoxitQPLLinuxCPP1711&)
 class FoxitQPLLinuxCPP1711
       ^~~~~~~~~~~~~~~~~~~~
Import/CPlusPlus/FoxitQPLLinuxCPP1711.h:174:7: note:   candidate expects 1 argument, 0 provided

I'm not a stellar cpp/c# programmer, but have a pretty good idea where the semi-colons go. I am currently writing code as baseline using 3 different pdf generation libraries, across both c++ and php, and this is the only library I have yet to get to work right out of the box.
A console-based reference script would be appreciated if available!
Thanks!
TH.
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