【发布时间】:2015-04-25 20:12:57
【问题描述】:
我正在使用以下代码生成PDF's。我想password protect PDF。
如何使用密码保护iTextSharp 中的 PDF?
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());
【问题讨论】:
标签: c# asp.net-mvc pdf itextsharp