PowerTools ActiveReports for .NET 9.0J
PdfSecurity クラス
メンバ  使用例 

PDFドキュメントのセキュリティと暗号化を提供するのに必要な情報をカプセル化します。
オブジェクト モデル
PdfSecurity クラス
構文
'宣言
 
Public Class PdfSecurity 
public class PdfSecurity 
解説

ユーザーパスワードが設定されている場合、ビューワアプリケーションはパスワードの入力を要求します。ユーザーパスワードが設定されていない場合、ドキュメントを開いたときにパスワードは要求されません。ユーザーパスワードあるいはオーナーパスワードのいずれかをユーザーが正しく入力することによって、暗号化されたドキュメントが復号化され、ビューワアプリケーション上で表示できます。開かれたドキュメントにおいて、このクラスの Permissionsプロパティで設定した許可属性が有効になるには、ユーザーパスワードが入力される必要があります。

使用例
private void btnExport_Click(object sender, System.EventArgs e)
{
    SectionReport1 rpt = new SectionReport1();
    GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport p = new GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport();
    p.Security.Encrypt = true;
    p.Security.OwnerPassword = "Mortimer";
    p.Security.UserPassword = "monkey";
    p.Security.Permissions = GrapeCity.ActiveReports.Export.Pdf.Section.PdfPermissions.AllowPrint;
    p.Security.Use128Bit = true;
    rpt.Run();
    this.viewer1.Document = rpt.Document;
    p.Export(rpt.Document, Application.StartupPath + "\\p.pdf");
}
Private Sub btnExport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    Dim rpt As New SectionReport1
    Dim p As New GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport
    p.Security.Encrypt = True
    p.Security.OwnerPassword = "Mortimer"
    p.Security.UserPassword = "monkey"
    p.Security.Permissions = GrapeCity.ActiveReports.Export.Pdf.Section.PdfPermissions.AllowPrint
    p.Security.Use128Bit = True
    rpt.Run()
    Me.Viewer1.Document = rpt.Document
    p.Export(rpt.Document, Application.StartupPath & "\p.pdf")
End Sub
継承階層

System.Object
   GrapeCity.ActiveReports.Export.Pdf.Section.PdfSecurity

参照

関連項目

PdfSecurity メンバ
GrapeCity.ActiveReports.Export.Pdf.Section 名前空間

 

 


©2003-2015 GrapeCity inc. All rights reserved.