Print Page | Close Window

Using DLL edition with Delphi

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=2860
Printed Date: 21 Sep 24 at 2:16AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Using DLL edition with Delphi
Posted By: HNRSoftware
Subject: Using DLL edition with Delphi
Date Posted: 05 Apr 14 at 4:36PM
I am working with the new Viewer SDK ActiveX which requires the Library v10 DLL to do a lot of the work.  A Delphi (v6) exe file using just the Viewer SDK is under 1Mb, whereas one with any use of the QuickPDF VCL library is 5Mb, which is essentially a second copy of the same v10 library code.

So far, all of the library documenation assumes that a Delphi developer uses the Delphi VCL edition.  Is there a practical way for Delphi to use the DLL edition?  (StdCall conversions?)  If so, could you provide some piece of sample code showing this structure?



Replies:
Posted By: HNRSoftware
Date Posted: 05 Apr 14 at 6:02PM
Ooops... I didn't get deep enough to find "DebenuPDFLibraryDLL1014.pas" which is right where it sensibly ought to be.  All I have to do now is make sure I have whatever "LoadLibrary" function I need put in the right place, and things should be good.  I think I lose the "stream" functionality with this approach, but I am not aware of other functionality losses.

I am a bit worried about version coordination - 10.13 vs 10.14 since the version number is in the file name.  I suspect that I have to download and install a new Viewer SDK when I upgrade the library version.  An alternative would be to deploy both library DLL versions.  I don't see any documentation mention of coordination.


Posted By: HNRSoftware
Date Posted: 06 Apr 14 at 5:51PM
Library DLL edition 10.13 working fine with Delphi 6.  Pushing all the QuickPDF and Viewer functions out to DLLs makes for reasonable sized exe files (less than 1Mb for serious functionality versus 5Mb for the VCL-based version). 

I'm having quite a few "issues" with the Viewer SDK, probably split 50/50 between my lack of understanding and some implementation flaws. 

Biggest surprise in the Viewer SDK is a positive one - the Viewer is very ***FAST*** on a huge (200Mb+, heavily graphic) pdf.   It should be an interesting next week.

@Moderator - Where do you want threads on the Viewer SDK?  Is it considered part of the "Library" or does it belong elsewhere?


Posted By: AndrewC
Date Posted: 07 Apr 14 at 6:09AM
HNRSoftware,

You will need to use the same version of the DLL and Viewer DLL otherwise you may experience some strange issues and crashes.

The required "DebenuPDFLibraryDLL1014.pas" file for the import can be found in the "DLL\Import\Delphi" folder of your Debenu Quick PDF Library installation.

Andrew.

Andrew.


Posted By: HNRSoftware
Date Posted: 07 Apr 14 at 2:25PM
@Andrew - Your point is technically correct, but, I think it represents a different problem with the same answer.  Rather than being an "add-on" to the PDF Library, the Viewer SDK could be looked at as a separate product from the multi-edition PDF library BECAUSE it is so closely tied to library version. 

As it now stands, the Viewer SDK "installation" package consists of mainly a Viewer ocx, a renderer dll and a specific version library dll.  If it also included "DebenuPDFLibraryDLL10xx.pas" and a couple of documentation pdfs, it would be a fully functional PDF Library "DLL Edition with Viewer" (and could be priced accordingly).

From the standpoint of a programmer implementing a PDF project which includes a Viewer SDK, I would rationally want to use the DLL Edition of the PDF library at the same time, and it would make the most sense to be using the exact same version (I don't think there would be any actual code conflicts with using v10.13 Viewer and v10.14 (or even v8.13) PDF Library - very poor coding practice, but technically legal).

My point is that treating the Library and the SDK as virtually separate products for installation and version updating, will cause me more problems than if the Viewer SDK actually contained a fully functional DLL-Edition PDF Library.  Version updating would be pretty much a single step and I would avoid a number of potential problems.

In reviewing what I just wrote, I can see a situation where I would want to use the VCL-Edition library along with the DLL-based Viewer (for streams).  My guess is that 95%+ of applications would want to use the DLL-Edition library if they were using the Viewer SDK, but it is probably not 100%.

Note: I find "Viewer SDK" to be an awkward way to reference it - it ought to have a name.



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