Print Page | Close Window

PB 10.5 with QuickPDF 816

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2371
Printed Date: 25 Apr 25 at 6:46PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: PB 10.5 with QuickPDF 816
Posted By: Ram
Subject: PB 10.5 with QuickPDF 816
Date Posted: 14 Aug 12 at 6:20AM
Hi,
 
We are evaluating the QUICKPDF with PowerBuilder 10.5.  I have written a piece of code to test the pdf merge functionality
 
Long ll_instance, ll_ret
 
ll_instance = QuickPDFCreateLibraryA()
ll_ret = QuickPDFUnlockKey(ll_instance, 'j57g79ru43q3xz8su8wu3ej8y')
 
if ll_ret = 1 then //
                ll_ret = QuickPDFAddToFileListA(ll_instance, 'List', 'one.pdf')
                 ll_ret = QuickPDFAddToFileListA(ll_instance, 'List', 'two.pdf')
                ll_ret= QuickPDFMergeFileList(ll_instance, 'List', 'three.pdf')
End if
 
I am not able to get return value 1 (ll_ret = 1) in the unlockkey function.  COuld you please help to overcome from this issue.
 
Thanks and regards,
Ram



Replies:
Posted By: AndrewC
Date Posted: 14 Aug 12 at 6:35AM
PowerBuilder uses AnsiStrings and Quick PDF Library defaults to Unicode strings.

We have added a set of 'A' functions to QPL to allow passing and returning of Ansi strings 

So instead of calling  :-

  QuickPDFUnlockKey      you call QuickPDFUnlockA
 

Also

 QuickPDFLoadFromFileA
 QuickPDFRenderPageToFileA
 QuickPDFMergeFileListA
 ...

Every QPL function that uses a string has a matching A function.


Long ll_instance, ll_ret
 
ll_instance = QuickPDFCreateLibrary()                                                         // <<
ll_ret = QuickPDFUnlockKeyA(ll_instance, 'j57g79ru43q3xz8su8wu3ej8y')  // <<
 
if ll_ret = 1 then // 
                ll_ret = QuickPDFAddToFileListA(ll_instance, 'List', 'one.pdf')
                 ll_ret = QuickPDFAddToFileListA(ll_instance, 'List', 'two.pdf')
                ll_ret= QuickPDFMergeFileListA(ll_instance, 'List', 'three.pdf')      // <<
End if

Andrew.
 



Posted By: Ram
Date Posted: 14 Aug 12 at 7:47AM
Hi Andrew
 
Thanks very much for sharing the tips to resolve the problem.  It is working perfectly fine now.  Is there any tips to create bookmarks inside the PDF's (like clicking on the master row should take me to detail rows in the same pdf document ).  I am trying to incorporate linkage chain between master and detail records like we are doing inside the Datawindow linkage.
 
I really appreciate your timely  help
 
Thanks and regards,
Ram


Posted By: Wheeley
Date Posted: 14 Aug 12 at 11:27PM
Ram,

Andrew is correct about Powerbuilder. Powerbuilder 10.5 does indeed use Ansi strings. BUT, if you upgrade to Powerbuilder 11.0 or greater, Powerbuilder then uses wide character (or sometimes called Unicode) strings. So depending on what functions you call you may have to change your code to accommodate Powerbuilder's internal changes.

Just a little warning
Wheeley





Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk