These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Setting Password Security using VB.NET or C#

manjunathk
Registered: Jun 17 2008
Posts: 2

Hi All,
I'm trying to create PDF documents on the fly and want to restrict users from editing the PDF files. I know that this can be accomplished using Password security. I searched a lot but could not find any references to VB.NET/C# code which can accomplish the same.

How can i "programmatically" (not manually), using VB.NET/C#, set password security on PDF file to restrict users from editing it?

Any help will be greatly appreciated.

Thanks,
Manju

My Product Information:
Acrobat Pro 8.1.2, Windows
lkassuba
ExpertTeam
Registered: Jun 28 2007
Posts: 3636
The best way to set document security would be to use the Acrobat user-level batch processing feature under Advanced --> Document Processing -->Batch Processing. There is a built-in batch sequence called 'Set Security to No Changes.sequ', which can be modified.The Acrobat Visual Basic API and the Acrobat Javascript API do not have the ability to set document security in a batch capability.

Thom Parker also has some suggestions on adding security in his tutorial [url=http://www.acrobatusers.com/tutorials/2007/10/apply_security_with_js/]Applying PDF Security with Acrobat Javascript[/url]; however, this is not as a batch process or called from VB.NET or C#.

If you're interested in automating this process at the server-level, you'll want to check out the LiveCycle Rights Management product at:
http://www.adobe.com/products/livecycle/rightsmanagement/

Lori Kassuba is an AUC Expert and Community Manager for AcrobatUsers.com.