Sign

Sign(int, string, string, string, bool, Rectangle)

PDF belgesine bir imza atın.

public void Sign(int page, string SigReason, string SigContact, string SigLocation, bool visible, 
    Rectangle annotRect)
ParametreTipTanım
pageInt32İmzanın yapıldığı sayfa numarası.
SigReasonStringİmza nedeni.
SigContactStringİmza iletişim.
SigLocationStringİmzanın yeri.
visibleBooleanİmzanın görünürlüğü.
annotRectRectangleİmza hakkı.

Örnekler

[C#]
string inFile = TestPath + "example1.pdf";
string outFile = TestPath + "signature.pdf";
PdfFileSignature pdfSign = new PdfFileSignature();
pdfSign.BindPdf(inFile);
System.Drawing.Rectangle rect = new System.Drawing.Rectangle(100, 100, 200, 200);
pdfSign.SignatureAppearance = TestPath + "butterfly.jpg";
pdfSign.SetCertificate("certificate.pfx", "password");
pdfSign.Sign(2, "Allen", "success", "ChangSha", true, rect);
pdfSign.Save(outFile);

[Visual Basic]
Dim pdfSign = new PdfFileSignature()
pdfSign.BindPdf(inFile)
Dim rect as System.Drawing.Rectangle = new System.Drawing.Rectangle(100, 100, 200, 200)
pdfSign.SetCertificate("certificate.pfx", "password")
pdfSign.Sign(2, "Allen", "success", "ChangSha", true, rect)
pdfSign.SignatureAppearance = TestPath + "butterfly.jpg"
pdfSign.Save(outFile)

Ayrıca bakınız


Sign(int, string, string, string, bool, Rectangle, Signature)

Belgeyi verilen tür imzasıyla imzalayın.

public void Sign(int page, string SigReason, string SigContact, string SigLocation, bool visible, 
    Rectangle annotRect, Signature sig)
ParametreTipTanım
pageInt32İmzanın yapıldığı sayfa numarası.
SigReasonStringİmza nedeni.
SigContactStringİmza iletişim.
SigLocationStringİmzanın yeri.
visibleBooleanİmzanın görünürlüğü.
annotRectRectangleİmza hakkı.
sigSignatureİmza türü, PKCS1, PKCS7 ve PKCS7Detached olabilir.

Örnekler

[C#]
string inFile = TestPath + "example1.pdf";
string outFile = TestPath + "signature.pdf";
PdfFileSignature pdfSign = new PdfFileSignature(inFile, outFile);
System.Drawing.Rectangle rect = new System.Drawing.Rectangle(100, 100, 200, 100);
pdfSign.SignatureAppearance = TestPath + "butterfly.jpg";
pdfSign.Sign(2, "Allen", "success", "ChangSha", true, rect, new PKCS1("certificate.pfx", "password"));
pdfSign.Save();

[Visual Basic]
Dim inFile As String = TestPath & "example1.pdf"
Dim outFile As String = TestPath & "signature.pdf"
Dim sig As PKCS1 = new PKCS1("certificate.pfx", "password")
Dim pdfSign = new PdfFileSignature(inFile, outFile)
Dim rect as System.Drawing.Rectangle = new System.Drawing.Rectangle(100, 100, 200, 100)
pdfSign.SignatureAppearance = TestPath & "butterfly.jpg"
pdfSign.Sign(2, "Allen", "success", "ChangSha", true, rect, sig)
pdfSign.Save()

Ayrıca bakınız


Sign(int, bool, Rectangle, Signature)

Belgeyi verilen tür imzasıyla imzalayın.

public void Sign(int page, bool visible, Rectangle annotRect, Signature sig)
ParametreTipTanım
pageInt32İmzanın yapıldığı sayfa numarası.
visibleBooleanİmzanın görünürlüğü.
annotRectRectangleİmza hakkı.
sigSignatureİmza türü, PKCS1, PKCS7 ve PKCS7Detached olabilir. İmza nedeni, iletişim ve konum gibi veriler bu nesnede zaten mevcut olmalıdır (ilgili özelliklere bakın).

Örnekler

[C#]
string inFile = TestPath + "example1.pdf";
string outFile = TestPath + "signature.pdf";
PKCS1 sig = new PKCS1("certificate.pfx", "password");
sig.Reason = "Some reason";
sig.Contact = "Smith";
sig.Location = "New York";
PdfFileSignature pdfSign = new PdfFileSignature(inFile, outFile);
System.Drawing.Rectangle rect = new System.Drawing.Rectangle(100, 100, 200, 100);
pdfSign.SignatureAppearance = TestPath + "butterfly.jpg";
pdfSign.Sign(2, true, rect, sig);
pdfSign.Save();

[Visual Basic]
Dim inFile As String = TestPath & "example1.pdf"
Dim outFile As String = TestPath & "signature.pdf"
Dim sig As PKCS1 = new PKCS1("certificate.pfx", "password")
sig.Reason = "Some reason"
sig.Contact = "Smith"
sig.Location = "New York"
Dim pdfSign = new PdfFileSignature(inFile, outFile)
Dim rect as System.Drawing.Rectangle = new System.Drawing.Rectangle(100, 100, 200, 100)
pdfSign.SignatureAppearance = TestPath & "butterfly.jpg"
pdfSign.Sign(2, true, rect, sig)
pdfSign.Save()

Ayrıca bakınız


Sign(string, string, string, string, Signature)

Halihazırda sunulan imza alanına yerleştirilen belgeyi verilen tip imza ile imzalayın. İmzalamadan önce imza alanı boş olmalıdır, yani alan imza sözlüğü içermemelidir. Bu nedenle pdf belgesinde zaten imza alanı var, yeri belirtmemelisiniz. imzayı damgalamak için, imza adıyla bulunan imza alanından ilgili sayfa ve dikdörtgen alınır (bkz. SigName parametresi).

public void Sign(string SigName, string SigReason, string SigContact, string SigLocation, 
    Signature sig)
ParametreTipTanım
SigNameStringİmza alanının adı.
SigReasonStringİmza nedeni.
SigContactStringİmza iletişim.
SigLocationStringİmzanın yeri.
sigSignatureİmza türü, PKCS1, PKCS7 ve PKCS7Detached olabilir.

Örnekler

[C#]
string inFile = TestPath + "example1.pdf";
string outFile = TestPath + "signature.pdf";
PKCS1 sig = new PKCS1("certificate.pfx", "password");
PdfFileSignature pdfSign = new PdfFileSignature(inFile, outFile);
pdfSign.SignatureAppearance = TestPath + "butterfly.jpg";
pdfSign.Sign("Signature1", "Allen", "success", "ChangSha", sig);
pdfSign.Save();

[Visual Basic]
Dim inFile As String = TestPath & "example1.pdf"
Dim outFile As String = TestPath & "signature.pdf"
Dim sig As PKCS1 = new PKCS1("certificate.pfx", "password")
Dim pdfSign = new PdfFileSignature(inFile, outFile)
pdfSign.SignatureAppearance = TestPath & "butterfly.jpg"
pdfSign.Sign("Signature1", "Allen", "success", "ChangSha", sig)
pdfSign.Save()

Ayrıca bakınız


Sign(int, string, string, string, string, bool, Rectangle, Signature)

Belgeyi, zaten sunulan imza alanına yerleştirilmiş olan imza türüyle imzalayın. İmzalamadan önce pdf belgesinin imza alanı olmalıdır, ilgili sayfa ve dikdörtgen, imza adıyla bulunan imza alanından alınır (bkz. SigName parametresi) .

public void Sign(int page, string SigName, string SigReason, string SigContact, string SigLocation, 
    bool visible, Rectangle annotRect, Signature sig)
ParametreTipTanım
pageInt32İmzanın yapıldığı sayfa numarası.
SigNameStringİmza alanının adı.
SigReasonStringİmza nedeni.
SigContactStringİmza iletişim.
SigLocationStringİmzanın yeri.
visibleBooleanİmzanın görünürlüğü.
annotRectRectangleİmza hakkı.
sigSignatureİmza türü, PKCS1, PKCS7 ve PKCS7Detached olabilir.

Örnekler

[C#]
string inFile = TestPath + "blankWithSignature.pdf";
string outFile = TestPath + "signature.pdf";
PKCS7 sig = new PKCS7("certificate.pfx", "password");
PdfFileSignature pdfSign = new PdfFileSignature(inFile);
System.Drawing.Rectangle rect = new System.Drawing.Rectangle(100, 100, 100, 100);
pdfSign.SignatureAppearance = TestPath + "butterfly.jpg"
pdfSign.Sign(1, "Signature1", "ReasonToTest", "ContactMe", "SomeLocation", true, rect, sig);                
pdfSign.Save(outFile);                

[Visual Basic]
Dim inFile As String = TestPath & "blankWithSignature.pdf"
Dim outFile As String = TestPath & "signature.pdf"
Dim sig As PKCS7 = new PKCS7("certificate.pfx", "password")
Dim pdfSign = new PdfFileSignature(inFile, outFile)
pdfSign.SignatureAppearance = TestPath & "butterfly.jpg"
pdfSign.Sign("Signature1",  "ReasonToTest", "ContactMe", "SomeLocation", true, rect, sig)
pdfSign.Save(outFile)

Ayrıca bakınız


Sign(string, Signature)

Halihazırda sunulan imza alanına yerleştirilen belgeyi verilen tip imza ile imzalayın. İmzalamadan önce imza alanı boş olmalıdır, yani alan imza sözlüğü içermemelidir. Bu nedenle pdf belgesinde zaten imza alanı var, yeri belirtmemelisiniz. imzayı damgalamak için, imza adıyla bulunan imza alanından ilgili sayfa ve dikdörtgen alınır (bkz. SigName parametresi). İmza nedeni, iletişim ve konum gibi veriler Signature nesnesinin karşılık gelen özellikleri tarafından sağlanmalıdır sig.

public void Sign(string SigName, Signature sig)
ParametreTipTanım
SigNameStringİmza alanının adı.
sigSignatureİmza türü, PKCS1 (Pkcs1Signature nesnesi), PKCS7 ve PKCS7 müstakil (Pkcs7Signature nesnesi) olabilir.

Örnekler

[C#]
string inFile = TestPath + "example1.pdf";
string outFile = TestPath + "signature.pdf";
PKCS1 sig = new PKCS1("certificate.pfx", "password");
sig.Reason = "Some reason";
sig.Contact = "Smith";
sig.Location = "New York";
PdfFileSignature pdfSign = new PdfFileSignature(inFile, outFile);
pdfSign.SignatureAppearance = TestPath + "butterfly.jpg";
pdfSign.Sign("Signature1", sig);
pdfSign.Save();

[Visual Basic]
Dim inFile As String = TestPath & "example1.pdf"
Dim outFile As String = TestPath & "signature.pdf"
Dim sig As PKCS1 = new PKCS1("certificate.pfx", "password")
sig.Reason = "Some reason"
sig.Contact = "Smith"
sig.Location = "New York"
Dim pdfSign = new PdfFileSignature(inFile, outFile)
pdfSign.SignatureAppearance = TestPath & "butterfly.jpg"
pdfSign.Sign("Signature1", sig)
pdfSign.Save()

Ayrıca bakınız