Allow to password-protect a document, so that it cannot be shown (read) without the password. Also, enable opening encrypted documents.
Workaround for encrypting:
PdfProcessing can be used to encrypt the document:
using (MemoryStream ms = new MemoryStream())
{
PdfFormatProvider pdfProcessingFormatProvider = new PdfFormatProvider();
Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider pdfFormatProvider = new Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider();
pdfFormatProvider.Export(flowDocument, ms);
RadFixedDocument fixedDocument = pdfProcessingFormatProvider.Import(ms);
using (Stream output = new FileStream(outputPath, FileMode.OpenOrCreate))
{
pdfProcessingFormatProvider.ExportSettings.IsEncrypted = true;
pdfProcessingFormatProvider.ExportSettings.UserPassword = "pass";
pdfProcessingFormatProvider.ExportSettings.ImageQuality = ImageQuality.Medium;
pdfProcessingFormatProvider.Export(fixedDocument, output);
}
}