Hello there.
We're currently trying to optimize the security of PDF-files which are generated using EO PDF in our web-application.
I've currently added document 'security' and 'information' fields to the download function in the form of a Post_Handler.
Ultimately we want the PDF to be non-editable
at all. Yet with the example below people can easily open the PDF in MS Word and edit the fields.
See example of the code below.
Quote:
MVCToPDF.RenderAsPDF(Post_Handler);
return View(model);
}
protected void Post_Handler(object sender, PdfDocumentEventArgs e)
{
EO.Pdf.HtmlToPdfResult result = MVCToPDF.Result;
if (result != null)
{
result.PdfDocument.Security.Disallow(PdfDocumentPermissions.ModifyingContents);
result.PdfDocument.Security.OwnerPassword = "APassword";
result.PdfDocument.Info.Author = "AnAuthorName";
result.PdfDocument.Info.Creator = "ACreatorName";
result.PdfDocument.Info.CreationDate = DateTime.Now;
}
}
When opening the PDF in Adobe programms, these seems to 'respect' the set security and prevent editing the downloaded PDF unless a user gives in a password.
I've read we might be able to add a PDF certificate using EO PDF.
How can I add this using the code above and what are the benefits of using a PDF certificate?
Does it prevent users from editing the PDF format and is there anyway to atleast prevent the really easy editing in programs like MS Word?