Handling Debenu Quick PDF Library during Code Migration to Unicode Delphi
If you are migrating your old Delphi code to the newer version of Delphi (Unicode version) and using Quick PDF library for handling PDF, this article may be useful to you. When I was migrating my old Delphi 7 application to Delphi XE4, I encountered a lot of issues and Quick PDF library was one of them. So, through this article, I just want to share the problem and its resolution.
In Delphi 7, Quick PDF library was used. When I tried to run that code in Delphi XE4 environment, I started getting errors. On of the error regarding Quick PDF, I got was:
"F2063 Could not compile used unit 'QuickPDF0724.pas'"
When I went to QuickPDF folder, it was full of dcu files only and later on I figured out that these dcu files were only compatible with the Delphi 7 version and I wanted new dcu files which could run on Delphi XE4 environment.
I downloaded the latest version of QuickPDF which is now owned by Debenu, replaced older dcu files with the new dcu files which are compatible with Delphi XE4 and had to make following changes in my code:
1. Used DebenuPDFLibrary1011 instead of QuickPDF0724 in "Uses" block.
2. Used TDebenuPDFLibrary1011 class instead of TQuickPDF0724 while declaring and initializing a PDF object.
Replaced following code
PDFObject : TQuickPDF0724;
PDFObject := TQuickPDF0724.Create;
PDFObject : TDebenuPDFLibrary1011;
PDFObject := TDebenuPDFLibrary1011.Create;
All other methods and their usage is same. So, that's it. This minor code change should solve your problem. Welcome to unicode Delphi!!!