i have follow this guidance https://www.e-iceblue.com/Tutorials/Spire.PDF/Demos/Security/PDF-DigitalCertificate-C-VB.NET.html but i get an error.
the first error is , though i have put a txt in the application folder.
but anyway i comment that section. the main problem is when try to make a certificate it pop up error
the main code is
- Code: Select all
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim doc As New PdfNewDocument()
' Create one page
Dim page As PdfPageBase = doc.Pages.Add()
'Draw the page
DrawPage(page)
Dim pfxPath As String = Application.StartupPath + "\Demo.pfx"
Dim cert As New PdfCertificate(pfxPath, "12345")
Dim signature As New PdfSignature(doc, page, cert, "demo")
signature.ContactInfo = "Haaaaa"
signature.Certificated = True
signature.DocumentPermissions = PdfCertificationFlags.AllowFormFill
'Save pdf file.
doc.Save("DigitalSignature.pdf")
doc.Close()
'Launching the Pdf file.
Process.Start("DigitalSignature.pdf")
End Sub
note: my main form load layout only got button