Hi, I'm working through a former co-workers PDFSharp code. At the moment it is filling out the fields correctly and saving the document, but when we open the document the fields are editable, is there a switch that I should be making in code to turn this feature off?
It's opened by:
Code:
PdfDocument template = PdfReader.Open(template_path, PdfDocumentOpenMode.Modify);
and edits the fields by:
Code:
form.Elements.Add("/NeedAppearances", new PdfBoolean(true));
then closes with a memory stream:
Code:
byte[] output = null;
MemoryStream MS = new MemoryStream();
template.Save(MS);
output = MS.ToArray();
return output;
so am I missing a simple fix?