I have a PDF which is a fillable form. When I add encryption the file the fields become read only. Can you please advise how the file can be encrypted while retaining the fields? The code I am using is as follows:
DocumentPrivilege dp = DocumentPrivilege.AllowAll;
dp.AllowModifyContents = false;
using (var stream = new FileStream(fullFileName, FileMode.Open, FileAccess.ReadWrite))
{
Document doc = new Document(stream);
using (PdfFileSecurity fs = new PdfFileSecurity(doc))
{
fs.EncryptFile(userPassword, ownerPassword, dp, KeySize.x256);
doc.Save();
}
}
I have observed issue you mentioned and have logged it as PDFNET-47790 in our issue tracking system. We will further look into details of the issue and keep you posted with the status of its correction. Please be patient and spare us little time.
I like to inform this issue has been added recently in our issue tracking system and as per our company policy, the first priority for investigation is given to the Paid Support i.e. Enterprise and Priority Support on first come first serve basis. After that the issues from normal support forum are scheduled for investigation on first come first serve basis. I request for your patience and we will share good news with you soon.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.