Upgrading to version 12 from version 11

There are no upgrade warnings when moving from version 11 to version 12. In this release we worked hard to ensure that no modifications to existing code bases would be required when upgrading.

Upgrading to version 11 from version 10

If you’re upgrading from version 10 to version 11 take note of the changes that occurred between version 10 and version 11.

For the version 11 release of Debenu Quick PDF Library there has been two minor changes:

  • The Linearized function has been renamed to IsLinearized for clarity
  • The ReplaceFonts function now includes new Options parameter

If you use any of these functions in your code then you may need to update your code to reflect the changes when moving to version 11.

Upgrading to version 11 from version 9

For the version 10 release of Debenu Quick PDF Library there are some minor modifications to the API that should be noted before upgrading from version 9:

  • RenderDocumentToFile – DPI parameter changed from Integer to Double
  • RenderPageToStream – DPI parameter changed from Integer to Double
  • RenderPageToString – DPI parameter changed from Integer to Double
  • RenderPageToFile – DPI parameter changed from Integer to Double
  • RenderPageToDC – DPI parameter changed from Integer to Double
  • DARenderPageToString – DPI parameter changed from Integer to Double
  • DARenderPageToStream – DPI parameter changed from Integer to Double
  • DARenderPageToFile – DPI parameter changed from Integer to Double
  • DARenderPageToDC – DPI parameter changed from Integer to Double
  • NewPageFromCanvasDC – DPI parameter changed from Integer to Double
  • GetFormFieldKidTempIndex – Renamed from GetFormFieldSubTempIndex

If you use any of these functions in your code then you may need to update your code to reflect the changes when moving to version 11.

Upgrading to version 11 from version 8

If you’re upgrading from version 8 to version 11 take note of the changes that occurred between version 8 and version 11.

With the release of Debenu Quick PDF Library 9 — and as mentioned in the blog post about the version 9 release — a noticeable change has been made to the API’s class and file naming conventions. The “QuickPDF” file and class name prefix has changed to “DebenuPDFLibrary” and the “QuickPDF” function prefix in the DLL edition has changed to “DPL”.

Here are a few examples of the changes:

File / Class Name Old New
32-bit ActiveX DLL QuickPDFAX0816.dll DebenuPDFLibraryAX0816.dll
64-bit ActiveX DLL QuickPDF64AX0816.dll DebenuPDFLibrary64AX0911.dll
32-bit ActiveX class name QuickPDFAX0816.PDFLibrary DebenuPDFLibraryAX0911.PDFLibrary
64-bit ActiveX class name QuickPDF64AX0816.PDFLibrary DebenuPDFLibrary64AX0911.PDFLibrary
32-bit DLL QuickPDFDLL0816.dll DebenuPDFLibraryDLL0911.dll
64-bit DLL QuickPDF64DLL0816.dll DebenuPDFLibrary64DLL0911.dll
Delphi unit name uses QuickPDF0816; uses DebenuPDFLibrary0911;
Delphi class name var DPL: TQuickPDF0816; var DPL: TDebenuPDFLibrary0911;
DLL exported function names QuickPDFLoadFromFilee DPLLoadFromFile

The changes to the class and file names is part of our overall re-branding that we discussed earlier in the year on our blog (New Debenu Website Launched).

Upgrading to version 11 from version 7

If you’re upgrading from version 7 to version 11 take note of the changes that occurred between version 7 and version 11.

Quick PDF Library 8 is a major new version of Quick PDF Library and contains a few changes to the API that were necessary to provide native support for Unicode and to improve the way secured PDF files are handled by the library. We also took this opportunity to rename some functions which used terms that conflicted with terms used by Acrobat.

This document contains a list of items that developers looking to upgrade to Quick PDF Library 8 should pay attention to. Changes to code may be required in order for your projects to compile using the new version.

1. Changed functions definitions

  • The LoadFromFile, LoadFromString, LoadFromVariant and LoadFromStream functions now have a Password parameter. Note functionality changes below.
  • The ExtractFilePages and GetFileMetadata functions now have a Password parameter.
  • All functions that previously returned or accepted 8-bit character strings (either UTF-8 encoded, WinAnsi encoding or unspecified encoding) now use UTF-16 Unicode strings.
  • Certain functions continue to accept or return 8-bit data, others have been renamed to more easily facilitate working with binary data.
  • All the text drawing functions (such as DrawText, DrawHTMLText) allow the text to be specified using UTF-16 Unicode strings. The fonts automatically convert the text string’s Unicode characters to the appropriate encoding for storing in the content stream.

2. Renamed functions

  • The fullowing functions have been renamed due to the changes from 8-bit to 16-bit strings. The change results in two new functions to replace each original function:

GetObjectSource

GetObjectToString (Delphi and DLL)

GetObjectToVariant (ActiveX)

SetObjectSource

SetObjectFromString (Delphi and DLL)

SetObjectFromVariant (ActiveX)

GetPageContent

GetPageContentToString (Delphi and DLL)

GetPageContentToVariant (ActiveX)

* Note functionality changes listed below

SetPageContent

SetPageContentFromString (Delphi and DLL)

SetPageContentFromVariant (ActiveX)

* Note functionality changes listed below

DAGetPageContent

DAGetPageContentToString (Delphi and DLL)

DAGetPageContentToVariant (ActiveX)

DAGetObjectSource

DAGetObjectToString (Delphi and DLL)

DAGetObjectToVariant (ActiveX)

ExtractFilePageContent

ExtractFilePageContentToString (Delphi and DLL)

ExtractFilePageContentToVariant (ActiveX)

  • In QPL v7 the term “layer” was used to describe a part of a page’s content stream. This conflicted with Adobe’s use of the term “layer” for the PDF feature known as optional content groups. To avoid confusion, all the layer functions have been renamed:

SetLayerOptional

SetContentStreamOptional

LayerCount

ContentStreamCount

CombineLayers

CombineContentStreams

NewLayer

NewContentStream

SelectLayer

SelectContentStream

EditableLayer

EditableContentStream

MoveLayer

MoveContentStream

DeleteLayer

DeleteContentStream

LayerSafe

ContentStreamSafe

UseUnsafeLayers

UseUnsafeContentStreams

EncapsulateLayer

EncapsulateContentStream

RemoveSharedLayers

RemoveSharedContentStreams

3. New functions

  • GetContentStreamToString and GetContentStreamToVariant have been added to replace the functionality previously provided by the GetPageContent function.
  • SetContentStreamFromString and SetContentStreamFromVariant have been added to replace the functionality previously provided by the SetPageContent function.
  • SetTextExtractionOptions was added to provide greater contrul over the text extraction functions.
  • CheckFileCompliance was added to check for PDF/A compliance along with the GetStringListCount, GetStringListItem functions needed to retrieve the compliance test results.
  • SetPDFAMode was added to allow the creation of new PDF/A-1b compliant documents.
  • Other new functions include DrawPDF417Symbul, AddTrueTypeSubsettedFont, SetLineDashEx and SetRenderCropType.

4. Removed functions

  • The SetAdvancePassword and SetPassword functions have been removed. They are no longer necessary because the LoadFrom* functions now have an additional parameter for specifying the password.

5. Changed functionality

  • When the LoadFrom* functions are used to open an encrypted document the objects will be automatically decrypted as necessary. Calls to SetPassword, SetAdvancePassword and Decrypt are no longer necessary to access any parts of an encrypted document. The SaveTo* functions can be used to save an encrypted document and the original encryption will remain in place with any new content automatically encrypted to the existing security settings.
  • The LoadFrom* functions now return 1 on success and 0 on failure. In QPL v7 these functions would return 2 if an encrypted document made use of object streams or cross reference streams. This is no longer necessary as these functions have a new password parameter. If the wrong password is given, the LoadFrom* functions will return 0 and the LastErrorCode function will return error code 404.
  • The Encrypt and Decrypt functions can still be used to add or remove security and full access to the document is possible even after encryption has been applied.
  • In QPL v7, the GetPageContent function returned only a portion of the page’s content stream. The replacement functions GetPageContentToString and GetPageContentToVariant now return the entire content stream of the selected page, not just an individual part.
  • Similarly, the SetPageContentFromString and SetPageContentFromVariant functions now set the entire content stream of the selected page, not just an individual part.
  • The SecurityInfo function returns the active encryption details even though encrypted object in documents are internally decrypted as needed.
  • XMP metadata is now added to new documents and maintained in existing documents. Calling functions like SetInformation will result in the XMP metadata being updated to keep that particular item in the document information dictionary in sync.

Upgrading to version 11 from iSEDQuickPDF

If you’re upgrading from iSEDQuickPDF to the latest version of Debenu Quick PDF Library you will need to take note of all the upgrade warnings above and also note that the filenames for the binaries changed from the iSEDQuickPDF branding to the new Debenu Quick PDF Library branding.