Encryption Preferences Class.
示例#1
0
        /// <summary>
        /// Sets the encryption preferences for this document.
        /// </summary>
        /// <param name="pdfRptEncryptedFileBuilder">encryption preferences builder</param>
        /// <returns></returns>
        public PdfReport Encrypt(Action<EncryptedFileBuilder> pdfRptEncryptedFileBuilder)
        {
            var builder = new EncryptedFileBuilder();
            pdfRptEncryptedFileBuilder(builder);

            if (DataBuilder.DocumentSecurity == null)
                DataBuilder.DocumentSecurity = new DocumentSecurity();

            DataBuilder.DocumentSecurity.EncryptionPreferences = builder.EncryptionPreferences;
            return this;
        }
示例#2
0
        /// <summary>
        /// Sets the encryption preferences for this document.
        /// </summary>
        /// <param name="pdfRptEncryptedFileBuilder">encryption preferences builder</param>
        /// <returns></returns>
        public PdfReport Encrypt(Action <EncryptedFileBuilder> pdfRptEncryptedFileBuilder)
        {
            var builder = new EncryptedFileBuilder();

            pdfRptEncryptedFileBuilder(builder);

            if (DataBuilder.DocumentSecurity == null)
            {
                DataBuilder.DocumentSecurity = new DocumentSecurity();
            }

            DataBuilder.DocumentSecurity.EncryptionPreferences = builder.EncryptionPreferences;
            return(this);
        }