Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Conversion from 7.26 to 8.15
  FAQ FAQ  Forum Search   Register Register  Login Login

Conversion from 7.26 to 8.15

 Post Reply Post Reply
Author
Message
Luke View Drop Down
Team Player
Team Player
Avatar

Joined: 13 Aug 10
Location: USA
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote Luke Quote  Post ReplyReply Direct Link To This Post Topic: Conversion from 7.26 to 8.15
    Posted: 15 May 12 at 12:35AM
I am converting from 7.26 to 8.15 using Delphi 2007. My code is to allow open but only allow printing. So I had two constants defined:
  OWNER_PASSWORD = 'test owner password';
  USER_PASSWORD = '';
and the following code:
var
  iPermissions: integer;
  iResult: integer;
begin
  iPermissions := FPDF.EncodePermissions( 1,     // Yes - CanPrint
                                                  0,     // No  - CanCopy
                                                  0,     // No  - CanChange
                                                  0,     // No  - CanAddNotes
                                                  0,     // No  - CanFillFields
                                                  0,     // No  - CanCopyAccess
                                                  0,     // No  - CanAssemble
                                                  1 );   // Yes - CanPrintFull
  iResult := FPDF.Encrypt( OWNER_PASSWORD, USER_PASSWORD, 2, iPermissions );
  FPDF.SaveToFile( 'test.pdf' );
end;

That code works with 7.26. However under 8.15 I am unable to open the saved file with Acrobat Reader, even with the password. I checked the return codes of each function and no errors were reported. However, if I change the Encrypt function to use 256 AES Encryption, i.e.
  FPDF.Encrypt( OWNER_PASSWORD, USER_PASSWORD, 3, iPermissions );
everything is fine. I can open the file without password and I am only able to print.

Luke

Luke M. Miller

ResCorSoft, Inc.
Back to Top
Wheeley View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 Oct 05
Location: United States
Status: Offline
Points: 146
Post Options Post Options   Thanks (0) Thanks(0)   Quote Wheeley Quote  Post ReplyReply Direct Link To This Post Posted: 15 May 12 at 3:03AM
It's looks like 8.16 beta 1 might have fixed it. Reviewing the change log it says that made a change to 128-bit AES encryption. I would try that version and see if your issue goes away.

Wheeley
Back to Top
Luke View Drop Down
Team Player
Team Player
Avatar

Joined: 13 Aug 10
Location: USA
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote Luke Quote  Post ReplyReply Direct Link To This Post Posted: 15 May 12 at 3:33AM
Thanks. Working on code that will go into production later this week. Would rather not use beta code. Easier just to use 256-bit encryption. Everyone should have upgraded to Acrobat 9 anyway.
Luke M. Miller

ResCorSoft, Inc.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store