PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Watermark on password protected document
https://forum.pdfsharp.net/viewtopic.php?f=2&t=3296
Page 1 of 1

Author:  pj1318 [ Thu Feb 18, 2016 6:17 am ]
Post subject:  Watermark on password protected document

Hi Team,

I am trying to update an application to use the latest version of Pdfsharp.

Pdfsharp is used to password protect the document, save it to a location and then add a watermark to the document at the location. After updating to latest Pdfsharp the property SecuritySettings.MaintainOwnerAndUserPassword seems to be obsolete.

Does the latest pdfsharp maintain the password after adding the watermark without setting the MaintainOwnerAndUserPassword property?

Any help would be much appreciated.

Thanks!!

Author:  Thomas Hoevel [ Thu Feb 18, 2016 9:07 am ]
Post subject:  Re: Watermark on password protected document

Hi!

There are no intended changes with respect to password handling.

If you think there is a new bug, then please submit a sample project that allows us to replicate the issue.

See also:
viewtopic.php?f=2&t=832
http://www.pdfsharp.net/wiki/IssueSubmissions.ashx

Author:  pj1318 [ Thu Feb 18, 2016 10:10 pm ]
Post subject:  Re: Watermark on password protected document

Hi Thomas,

Thanks for the reply.

The application I am updating is an old one and there are no unit tests written to conduct a test. I will have to wait till an integration testing can be done. For the time being I have commented the line as below

if (document.SecurityHandler.Elements.Count > 0)
{
document.SecuritySettings.DocumentSecurityLevel = PdfDocumentSecurityLevel.Encrypted128Bit;
//document.SecuritySettings.MaintainOwnerAndUserPassword = true;
}
This is a code snippet in the function for creating the watermark.

Hope that the latest pdfsharp would maintain the password after watermarking.

Thanks again!

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/