Hello ,
I have created the pdf through amyuni but now I want restrict it
for printing (ie no should be able to print that).
Print option should get disable if some open my pdf in other editor.
and no body should be able to copy the text from pdf
then How it is possible.
code snippet will be prefer. waiting for reply
Thanking You
---------------------------
Kamlesh Gujarathi
kamlesh@itshastra.com
How I can set restriction to Print the PDF in My PDF file ?
-
- Posts: 39
- Joined: Fri Jan 09 2004
- Location: Bombay ( INDIA)
- Contact:
Hello,
to set restrictions on the pdf document you can do this either using the PDF Converter or the PDF Creator but you need to have the Professional version of these products.
If you are using the PDF Converter to generate the pdf document, you can then open the generated PDF and encrypte it.
Example DLL interface:
Example ActiveX interface:
The permission values are:
To combine multiple options you can use -64 plus the values 4, 8, 16, 32. eg to enable both printing and adding notes you can use -64+4+32 = 28. To disable all 4 options you need to use -64.
Hope this helps.
to set restrictions on the pdf document you can do this either using the PDF Converter or the PDF Creator but you need to have the Professional version of these products.
If you are using the PDF Converter to generate the pdf document, you can then open the generated PDF and encrypte it.
Example DLL interface:
Code: Select all
SetLicenseKeyA LicenseTo, ActivationCode
EncryptPDFDocument "c:\Temp\Test.pdf", "Owner", "User", -64
'OR
EncryptPDFDocument128 "c:\Temp\Test.pdf", "Owner", "User", -64
Code: Select all
Dim doc as new CDintfEx.Document
doc.Open "C:\Temp\Test.pdf"
doc.SetLicenseKey LicenseTo, ActivationCode
doc.Encrypt "owner", "user", -64 '40 bits encryption
'OR
doc.Encrypt128 "owner", "user", -64 '128 bits encryption
doc.Save "C:\Temp\Encrypted.pdf"
Code: Select all
-64+4 EnablePrinting
-64+8 Enable document modification
-64+16 Enable copying text and graphics
-64+32 Enable adding and changing notes
Hope this helps.