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 - Locking created pdf
  FAQ FAQ  Forum Search   Register Register  Login Login

Locking created pdf

 Post Reply Post Reply
Author
Message
perry View Drop Down
Beginner
Beginner


Joined: 03 Nov 06
Location: United Kingdom
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote perry Quote  Post ReplyReply Direct Link To This Post Topic: Locking created pdf
    Posted: 18 Jun 07 at 2:16PM
Does anyone know of any way to 'lock' the created pdf so that it cannot be updated by quickpdf, acrobat or any other software.  I have a feeling that there is something in Acrobat SDK but can't find anything in iSed QiickPdf
Back to Top
bogey View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 Nov 05
Location: United States
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote bogey Quote  Post ReplyReply Direct Link To This Post Posted: 18 Jun 07 at 2:36PM
This is how I do it in VBScript:
 
 
function secureForm(thisDoc)
 call QP.SelectDocument(thisDoc)
  fncDebug("<br><b><i>Securing Form</i></b>")
  '===========================================
  'Set Document Information
  '===========================================
  'QP.SetInformation(0) = ""   'PDF Version
  call QP.SetInformation(1,"Union Central")  'Author
  call QP.SetInformation(2,"")  'Title
  call QP.SetInformation(3,"")  'Subject
  call QP.SetInformation(4,"")  'KeyWords
  call QP.SetInformation(5,"Union Central")  'Creator
  call QP.SetInformation(6,Request.ServerVariables("SERVER_NAME"))  'Producer

  '===========================================
  'Lock each PDF file prior to delivery
  '===========================================
  'Default Permissions
  permissions = "10011011"
  'for 40 bit encryption
   '1.canPrint (ALLOW Printing )
   '2.canCopy  (ALLOW content copying or extraction, content accessibility enabled)
   '3.canChange (ALLOW Changing the document, Form Fill-in & signing, Document Assembly)
   '4.canAddNotes (ALLOW Authoring Comments and Form Fields, Form Field Fill-in & Signing)
  'for 128 bit encryption (not used, only compatible with Acrobat 5 and up)
   '5.canFillFields YES,
   '6.canCopyAccess NO,
   '7.canAssemble YES,
   '8.canPrintFull YES
  fncDebug("<br>Setting Form Permissions = " & permissions)
  'Permissions - canPrint, canCopy, canChange, canAddNotes, canFillFields, canCopyAccess, canAssemble, canPrintFull
  permissions=QP.Permissions(returnbln(permissions,1), returnbln(permissions,2), returnbln(permissions,3), returnbln(permissions,4), returnbln(permissions,5), returnbln(permissions,6), returnbln(permissions,7), returnbln(permissions,8))

  'encrypt 40 bit for compatibility with acrobat 3 and 4
  call QP.Encrypt(PDFPassword,"",0,permissions)
 secureForm = QP.SelectedDocument
end function

Back to Top
perry View Drop Down
Beginner
Beginner


Joined: 03 Nov 06
Location: United Kingdom
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote perry Quote  Post ReplyReply Direct Link To This Post Posted: 28 Jun 07 at 4:18AM
Hi Bogey
thanks for this excellent example. 
 
Having disabled 'change,copy' etc, does this enable me to distribute the document so that they can view it without knowing any password but prevent them from editing it with any PDF software?
thanks.
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 28 Jun 07 at 4:35AM
Hi Perry!

Yes. Using only the main password protects your settings but the reader doesn't need a password to read the document.
If the user shall insert a password before reading you have to set the user password, too.

Keep in mind that there are tools out there for removing the main password from pdf-documents... It's not really safe. A user password is much safer ... but uncomfortable for the readers.

Best regards,
Ingo

Back to Top
marian_pascalau View Drop Down
Debenu Quick PDF Library Expert
Debenu Quick PDF Library Expert


Joined: 28 Mar 06
Location: Germany
Status: Offline
Points: 278
Post Options Post Options   Thanks (0) Thanks(0)   Quote marian_pascalau Quote  Post ReplyReply Direct Link To This Post Posted: 28 Jun 07 at 5:01AM

Perry,

a short info. Please keep in mind that only few applications will protect data inside PDF files. If user is able to open your document he is able to modify whatever he wants.

 

There is no real way to protect your document for changes. The only possibility is to protect it with password and a digital certificate. Any user will be able to alter your document but will break for sure the signature of your original file.

 

Best regards, Marian

 



Edited by marian_pascalau - 28 Jun 07 at 5:03AM
Back to Top
bogey View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 Nov 05
Location: United States
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote bogey Quote  Post ReplyReply Direct Link To This Post Posted: 28 Jun 07 at 8:15AM
Locking a PDF with a password does nothing more than keep the honest people honest. It is far too easy to crack for someone that is determined.
 
 
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