I am using following code to generate PDF's
. I want to password protect
the PDF.
How to Password Protect PDF's in iTextSharp
?
document = new Document(PageSize.A4, 10, 10, 25, 25);
output = new MemoryStream();
writer = PdfWriter.GetInstance(document, output);
document.Open();
document.Add(OuterTable);
document.Close();
System.IO.File.WriteAllBytes(Server.MapPath("~/PDFs/" + name.ToString() + ".pdf"), output.ToArray());