PowerTools ActiveReports for .NET 11.0J
SignDate プロパティ
使用例 

文書に電子署名が付加された日付を取得または設定します。
構文
'宣言
 
Public Property SignDate As SignatureField(Of Date)
public SignatureField<DateTime> SignDate {get; set;}
解説

本機能は、Professionalのみ対応しています。Standardでは、出力したPDFにProfessionalのライセンスが必要なことを示すバナーが表示されます。

注意: 暗号化されたPDF 文書へエクスポートする場合、電子署名を付加することはできません。

上記のコード例では、証明書のパス、ファイル名、およびパスワードを、自分の証明書
の情報で置き換えて、タイムスタンプ局(TSA)URLを自分のTSAのURLで置き換えてください。

注意:あなたのアプリケーションのために、実際のTSAでボリュームベースの登録を購入する必要があります。

使用例
' テキストの署名
Me.PdfExport1.Signature.VisibilityType = GrapeCity.ActiveReports.Export.Pdf.Section.Signing.VisibilityType.Text
Me.PdfExport1.Signature.Stamp.Bounds = New RectangleF(1, 1, 4, 2)
Me.PdfExport1.Signature.Stamp.TextAlignment = GrapeCity.ActiveReports.Export.Pdf.Section.Signing.Alignment.Left

' 証明書とパースワードを設定する
Me.PdfExport1.Signature.Certificate = New Security.Cryptography.X509Certificates.X509Certificate2(Application.StartupPath & "\..\..\certificate.pfx", "password")

' 署名の項目
Me.PdfExport1.Signature.SignDate = New GrapeCity.ActiveReports.Export.Pdf.Section.Signing.SignatureField(Of Date)(System.DateTime.Now, True)
Me.PdfExport1.Signature.Contact = New GrapeCity.ActiveReports.Export.Pdf.Section.Signing.SignatureField(Of String)("ar7@grapecity.com", True)
Me.PdfExport1.Signature.Reason = New GrapeCity.ActiveReports.Export.Pdf.Section.Signing.SignatureField(Of String)("I agree.", True)
Me.PdfExport1.Signature.Location = New GrapeCity.ActiveReports.Export.Pdf.Section.Signing.SignatureField(Of String)("Japan", True)

' タイムスタンプ
Me.PdfExport1.Signature.TimeStamp = New GrapeCity.ActiveReports.Export.Pdf.Section.Signing.TimeStamp("http://TSAServer", "null", "null")
Me.PdfExport1.Export(rpt.Document, Application.StartupPath & "\..\..\TimeStamped.pdf")
this.pdfExport1.Signature.VisibilityType = GrapeCity.ActiveReports.Export.Pdf.Section.Signing.VisibilityType.Text;
this.pdfExport1.Signature.Stamp.Bounds = new RectangleF(1, 1, 4, 2);
this.pdfExport1.Signature.Stamp.TextAlignment = GrapeCity.ActiveReports.Export.Pdf.Section.Signing.Alignment.Left;

// 証明書とパースワードを設定する
this.pdfExport1.Signature.Certificate = new System.Security.Cryptography.X509Certificates.X509Certificate2(Application.StartupPath + "\\..\\..\\certificate.pfx", "password");

// 署名の項目
this.pdfExport1.Signature.SignDate = new GrapeCity.ActiveReports.Export.Pdf.Section.Signing.SignatureField<System.DateTime>(System.DateTime.Now, true);
this.pdfExport1.Signature.Contact = new GrapeCity.ActiveReports.Export.Pdf.Section.Signing.SignatureField<string>("ar7@grapecity.com", true);
this.pdfExport1.Signature.Reason = new GrapeCity.ActiveReports.Export.Pdf.Section.Signing.SignatureField<string>("I agree.", true);
this.pdfExport1.Signature.Location = new GrapeCity.ActiveReports.Export.Pdf.Section.Signing.SignatureField<string>("Japan", true);

// タイムスタンプ
this.pdfExport1.Signature.TimeStamp = new GrapeCity.ActiveReports.Export.Pdf.Section.Signing.TimeStamp("http://TSAServer", "null", "null");
this.pdfExport1.Export(rpt.Document, Application.StartupPath + "\\..\\..\\TimeStamped.pdf");
参照

関連項目

PdfSignature クラス
PdfSignature メンバ

 

 


©2003-2017 GrapeCity inc. All rights reserved.