Print Page | Close Window

Error With Encrypt !

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=1922
Printed Date: 14 Dec 25 at 12:30AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Error With Encrypt !
Posted By: m_alam
Subject: Error With Encrypt !
Date Posted: 11 Aug 11 at 11:59AM
hi, Greetings
i am trying to encrypt a file with all restriction.
and also want user to need to type password when open the encrypted pdf..

so i tried..
lngEncID = QPDF.EncodePermissions(0, 0, 0, 0, 0, 0, 0, 0)
QPDF.Encrypt "KamrulHassan", "KamrulHassan", 2, lngEncID


but it's not works; it's ask for the password but there is no restriction

and when i only use master/owner  password then restriction works, but not ask the user for password :(
QPDF.Encrypt "KamrulHassan", "", 2, lngEncID


and when i only use user  password then restriction does not works, but ask the user for password :(
QPDF.Encrypt "", "KamrulHassan", 2, lngEncID


so, my question is how i can merge both encryption (password and restriction)

please anyone help me out asap

best regards
kamrul hassan



Replies:
Posted By: Ingo
Date Posted: 11 Aug 11 at 2:08PM
Hi!

Any security setting needs at least and always the main password.
Your problem is here:
Shohag.EncodePermissions...
QPDF.Encrypt...
Try "QPDF.EncodePermissions..." and it will work with
"QPDF.Encrypt..." ;-)

Cheers, Ingo



Posted By: m_alam
Date Posted: 11 Aug 11 at 2:15PM
you don't get it sir, that's just a typing mistake..

because in my coding i used "Shohag" as the variable of libray.. and to make it clear here, i just change the "Shohag" to "QPDF" and forgot to Chane that one :(

how ever thanks for your reply

best regards



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