View previous topic :: View next topic |
Author |
Message |
chuawenching
Joined: 30 Oct 2008 Posts: 2
|
Posted: Thu Oct 30, 2008 8:13 am Post subject: Protect/Unprotect existing PDFs files |
|
|
Hi, I got to know this great PDF library when researching online. I had a situation here. I am quite new to this APIs.
I have 1 folder where the files are dynamically download from the source server. Lets make an assumption, there are 10 PDFs files in this folder (non protected).
I need to transfer this files across the wire. So I need to protect these 10 files with a secret key or password. Then over the destination, I like to unprotect these documents back to the actual documents.
Can I actually do this in PDFSharp? Any snippets to make this happen?
I saw the protect sample code. But it doesn't meet my needs here. Any help?
Thanks. |
|
Back to top |
|
|
Thomas Hoevel
Joined: 16 Oct 2006 Posts: 387 Location: Cologne, Germany
|
Posted: Thu Oct 30, 2008 9:48 am Post subject: |
|
|
Hi!
I'm not sure what you exactly want.
There's a protect sample that adds a password.
There's an unprotect sample that removes the password.
Both change the password that prevents editing. Files are still viewable.
You can also set a password to prevent viewing - Adobe Reader prompts for the password before showing the file. Is that what you want?
You can also store the PDF files in a password protected archive (ZIP, RAR, ...). _________________ Regards
Thomas Hoevel
PDFsharp Team |
|
Back to top |
|
|
chuawenching
Joined: 30 Oct 2008 Posts: 2
|
Posted: Thu Oct 30, 2008 12:14 pm Post subject: |
|
|
Thanks for the response.
Basically, I have 10 existing PDF documents (all un-protected without any password). Can I use C# programmatically protect/unprotect these files using PDFSharp?
Hope you understand.
Any help? |
|
Back to top |
|
|
Thomas Hoevel
Joined: 16 Oct 2006 Posts: 387 Location: Cologne, Germany
|
Posted: Thu Oct 30, 2008 12:17 pm Post subject: |
|
|
Look at the ProtectDocument and UnprotectDocument samples. _________________ Regards
Thomas Hoevel
PDFsharp Team |
|
Back to top |
|
|
|