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!
Encrypt Function fails when page no excceds 7 |
Post Reply |
Author | |
sangeeth
Beginner Joined: 03 Mar 12 Location: EKM Status: Offline Points: 7 |
Post Options
Thanks(0)
Posted: 03 Mar 12 at 6:31AM |
Hi,
I am using QUICK PDF Version 0723 (DELPHI) and in that I can successfully encrypt the file with function EncodePermissions(1,0,0,0,0,0,0,0) and it successfully works if number of pages less than or equal to 7. The function fails and I got a blank page when the number of page exceeds 7. I even tried the trail version 0813 of Quick PDF and got the same problem. Could any one please help me. Thanks. Sangeeth
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi Sangeeth!
Do you believe this by yourself??? Keep in mind that there are a lot of QuickPDF-users out there and encrypt and decrypt is not a seldom used function. Often here are users talking about 1000 and more pages. You're completely on the wrong way with your prob. The question should be: Do you have this prob with only one pdf or with each pdf? What about deleting page 8 and try to encrypt the pdf then? Perhaps on page 8 there's a special new technic not support by QuickPDF yet? Think here are few guys helping you out if you're able to upload the problem-pdf anywhere. Posting your code (the relevant part) could be helpful, too. Cheers and welcome here, Ingo |
|
sangeeth
Beginner Joined: 03 Mar 12 Location: EKM Status: Offline Points: 7 |
Post Options
Thanks(0)
|
Hi Ingo,
Thank you for the quick response. I will post sample code here please let me know if I am in the wrong way. Var pdflb : Tquickpdf0723; EncPerm,unloackresult : integer; begin pdflb := Tquickpdf0723.Create; unloackresult := pdflb.UnlockKey(//key); //license key orginal pdflb.LoadFromFile('D:\testquickpdfissue.pdf'); EncPerm:=pdflb.EncodePermissions(1,0,0,0,0,0,0,0); pdflb.Encrypt('locked_down','',1,EncPerm); pdflb.SaveToFile('D:\quickpdfencrypted.pdf'); Is there any option to attach the sample file which failed to encrypt so that I can attach for reference. I tried to encrypt few pdf files from the net and there is some issue for encrypt with some files. Thanks, Sangeeth |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi!
You can't see anything wrong from this code-snippet.
What could be is:
If the loaded files are encrypted your new encryption won't work.
First you have to check if the files are encrypted and if "yes" you
have to decrypt them and then you can create a new encryption.
You understand? ...you can't create a new encryption on a file
where's already an encryption with a main password ;-)
This could be a possible reason for your probs.
Cheers, Ingo
|
|
sangeeth
Beginner Joined: 03 Mar 12 Location: EKM Status: Offline Points: 7 |
Post Options
Thanks(0)
|
Hi Ingo,
Thanks for the reply. But the file testquickpdfissue.pdf is created by converting a text file for testing purpose and there is no encryption applied for it. only thing I noted that in the text file if the file is less than 70KB (Approx) the LoadFromFile works without any issue and also encrypted without any issue. When I added few more lines to the testquickpdfissue.pdf it failed to encrypt the file. If I remove the extra added lines the encryption works again without any issue. If there is any option here to attach the files you may be able to check. Thanks, Sangeeth
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi!
You can't upload a testfile 'cause
it's only a user-user-forum here.
There are many free filehoster on the net
doing this service for you for free ;-)
You can use the official support-pages
there's an upload-option, too. There
your prob would be managed by the official
publishers of the library.
Cheers, Ingo
|
|
sangeeth
Beginner Joined: 03 Mar 12 Location: EKM Status: Offline Points: 7 |
Post Options
Thanks(0)
|
Hi Ingo,
Thank you for the information. I will try the Technical support. Thanks, Sangeeth
|
|
AndrewC
Moderator Group Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
|
Andrew.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store