ByteScout PDF SDK - VB.NET - Sign PDF - ByteScout

ByteScout PDF SDK – VB.NET – Sign PDF

How to sign PDF in VB.NET and ByteScout PDF SDK

This code in VB.NET shows how to sign PDF with this how to tutorial

ByteScout tutorials are designed to explain the code for both VB.NET beginners and advanced programmers. ByteScout PDF SDK is the pdf library that can create, update and modify PDF files. Supports text with fonts and style selections, layers, form fields, drawing lines and objects, automatic tables, images. Can be used to create and fill pdf forms. It can be used to sign PDF using VB.NET.

VB.NET code samples for VB.NET developers help to speed up coding of your application when using ByteScout PDF SDK. This VB.NET sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! Enjoy writing a code with ready-to-use sample VB.NET codes.

Our website provides trial version of ByteScout PDF SDK for free. It also includes documentation and source code samples.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Program.vb
      
Imports System.Drawing Imports Bytescout.PDF ''' <summary> ''' This example demonstrates how to digitally sign PDF document. ''' </summary> Class Program Shared Sub Main() ' Create new document Dim pdfDocument = New Document() pdfDocument.RegistrationName = "demo" pdfDocument.RegistrationKey = "demo" ' Add page Dim page = New Page(PaperFormat.A4) pdfDocument.Pages.Add(page) ' Add sample page content Dim brush = New Bytescout.PDF.SolidBrush() Dim font = New Bytescout.PDF.Font("Arial", 16) Dim rect = New RectangleF(0, 50, page.Width, 100) Dim stringFormat = New Bytescout.PDF.StringFormat() stringFormat.HorizontalAlign = HorizontalAlign.Center page.Canvas.DrawString("Signature Test", font, brush, rect, stringFormat) ' Signing parameters Dim certficateFile = ".\demo_certificate.pfx" Dim certficatePassword = "123" ' Optional parameters Dim signingReason = "Approval" Dim contactName = "John Smith" Dim location = "Corporate HQ" ' Invisible signature 'pdfDocument.Sign(certficateFile, certficatePassword) ' Visible signature Dim signatureRect = New RectangleF(400, 50, 150, 100) pdfDocument.Sign(certficateFile, certficatePassword, signatureRect, signingReason, contactName, location) ' Save document to file pdfDocument.Save("result.pdf") ' Cleanup pdfDocument.Dispose() ' Open document in default PDF viewer application Process.Start("result.pdf") End Sub End Class

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF SDK Home Page

Explore ByteScout PDF SDK Documentation

Explore Samples

Sign Up for ByteScout PDF SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF SDK Home Page

Explore ByteScout PDF SDK Documentation

Explore Samples

Sign Up for ByteScout PDF SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next