Print Page | Close Window

List of breaking changes

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=1976
Printed Date: 04 Feb 26 at 5:27AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: List of breaking changes
Posted By: ToniSanta
Subject: List of breaking changes
Date Posted: 28 Sep 11 at 12:57PM
Hi,
I'm upgrade a project from iSedQuickPDF to QuickPDF0811. My DelphiXE-compiler now shows me a lot of DCC-Errors. Do you have a list of replaced/changed functions? In the documentation I found that .Encrypted was replaced with .EncryptionStatus, but for the SetPassword I cannot find any replacement (looked in the reference guide, too). Looking the online-FAQ ( http://www.quickpdflibrary.com/faq/removing-a-password.php - http://www.quickpdflibrary.com/faq/removing-a-password.php ) there are still samples to SetPassword. Somewhere in this forum I found SetAdvancePassword, but this function is missing in the reference guide so I cannot know it meanings.
Please help, I've the following code:
      FPDFDoc := FQPDF.LoadFromFile(pdfFile, '');
      try
        if (FQPDF.EncryptionStatus > 0) then
        begin
          //ns pw standard
          FQPDF.SetPassword('MyUsualPassword');
          if (FQPDF.Unencrypt = 0) then
            FQPDF.SetPassword('UsersUsualPassword');
best regards
Toni
 



Replies:
Posted By: AndrewC
Date Posted: 28 Sep 11 at 1:54PM

A lot has changed between iSedPDF and Quick PDF Library 8.11.  The Developer Guide will help you understand some of the basic usage of 8.11.  You can find the PDF files in the QPL 8.11 installation directory.

Here is some code that should help you start to understand the changes from the iSedPDF verison

Andrew.

06/09/2011  07:47 PM           624,737 Quick PDF Library 8 Developer Guide.pdf
06/09/2011  07:12 PM            89,743 Quick PDF Library 8 Upgrade Warnings.pdf


  ret := QP.LoadFromFile(pdfFile, '');

  if (ret <> 1) then
    if (QP.LastErrorCode == 404)
      ret := QP.LoadFromFile(pdfFile, 'MyUsualPassword');
  
  if (ret = 1) and (QP.EncryptionAlgorithm() <> 0)
      QP.Decrypt();

  QPDocId := QP.SelectedDocument();  // This docid is used with some QPL functions.


Andrew
      try
        if (FQPDF.EncryptionStatus > 0) then
        begin
          //ns pw standard
          FQPDF.SetPassword('MyUsualPassword');
          if (FQPDF.Unencrypt = 0) then
            FQPDF.SetPassword('UsersUsualPassword');


Posted By: ToniSanta
Date Posted: 28 Sep 11 at 2:53PM
Hi,
thanks for your answer, I will adapt and try the new approach to handle protections. Could several QP.LoadFromFile(..) till finding the correct password (there could be a list of predefined pwds in my application) be slower than the previous SetPassword?
And just a second question: How would I have to handle files protected with user (open) and owner (modify) passwords? Will I have to open such a file first with user-password, save them to a new file and reopen it with then owner-password? For large files this could result memory-, diskspace- and timeconsuming. Or is there another way?
 
best regards
Toni
 
 



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