Skip to main content
Participant
May 17, 2018
Answered

How to modify password and security settings for pdf file in C#?

  • May 17, 2018
  • 1 reply
  • 979 views

I'm an intern working on a program that uses the OpenXml SDK to modify some info in a word doc and then convert it to PDF using interop. Unfortunately I am unable to programmatically password-protect the PDF or change any of the security settings with interop. I'm looking for a way to do this that doesn't require me to release my source code or require my employer to pay for a software license. I've heard that I might need to write a plugin in C++ and then use unmanaged exports to call it in C#. Is this true? What are my options?

This topic has been closed for replies.
Correct answer Test Screen Name

Certainly there is no C# API to this. And using a plugin externally is painful and awkward territory. Is this for a server? If so I have good and bad news...

1 reply

Test Screen NameCorrect answer
Legend
May 17, 2018

Certainly there is no C# API to this. And using a plugin externally is painful and awkward territory. Is this for a server? If so I have good and bad news...

Participant
May 17, 2018

This is not for a server, it's for a windows forms program to be ran locally.