PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Prevent PDF Save
https://forum.pdfsharp.net/viewtopic.php?f=2&t=236
Page 1 of 1

Author:  webgunz [ Fri Oct 05, 2007 2:48 am ]
Post subject:  Prevent PDF Save

Is there a way to prevent the save of the file (but allowing printing)?

I've tried this but doesn'y work:

Code:
PdfDocument doc = new PdfDocument();

doc.SecuritySettings.DocumentSecurityLevel = PdfDocumentSecurityLevel.None;

doc.SecurityHandler.OwnerPassword = "XXX";
doc.SecuritySettings.OwnerPassword = "XXX";

doc.SecuritySettings.PermitAccessibilityExtractContent = false;
doc.SecuritySettings.PermitAnnotations = false;
doc.SecuritySettings.PermitAssembleDocument = false;
doc.SecuritySettings.PermitExtractContent = false;
doc.SecuritySettings.PermitFormsFill = false;
doc.SecuritySettings.PermitModifyDocument = false;

doc.SecuritySettings.PermitPrint = true;
doc.SecuritySettings.PermitFullQualityPrint = true;

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/