Every ByteScout tool contains example VB.NET source codes that you can find here or in the folder with installed ByteScout product. Want to add header and footer in your VB.NET app? ByteScout PDF SDK is designed for it. ByteScout PDF SDK is the component to help programmers in generating new pdf files, modifying and updating existing pdf documents or pdf forms. Provides support for auto-filling pdf forms, adding text with adjustable font, style, size, font family, new form fields, vector and raster drawings.
VB.NET code samples for VB.NET developers help to speed up coding of your application when using ByteScout PDF SDK. Just copy and paste the code into your VB.NET application’s code and follow the instruction. This basic programming language sample code for VB.NET will do the whole work for you to add header and footer.
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)
Imports Bytescout.PDF Imports Font = Bytescout.PDF.Font Imports SolidBrush = Bytescout.PDF.SolidBrush Module Program Sub Main() Try Using doc As Document = New Document() doc.RegistrationName = "demo" doc.RegistrationKey = "demo" doc.Load("sample.pdf") ' Prepare simple template (for example, a logo) And draw it on every page ' Create template of specified size Dim headerTemplate As GraphicsTemplate = New GraphicsTemplate(250, 50) headerTemplate.DrawString("Here is a header text", New Font(StandardFonts.CourierBold, 15), New SolidBrush(), 30, 10) Dim footerTemplate As GraphicsTemplate = New GraphicsTemplate(250, 50) footerTemplate.DrawString("Here is the footer text", New Font(StandardFonts.CourierBold, 15), New SolidBrush(), 30, 10) ' Write template in each pages For i As Integer = 0 To doc.Pages.Count - 1 Dim currentPage As Page = doc.Pages(i) currentPage.Canvas.DrawTemplate(headerTemplate, 40, 10) currentPage.Canvas.DrawTemplate(footerTemplate, 350, (currentPage.Height - 40)) Next ' Save output file doc.Save("result.pdf") End Using ' Open output file Process.Start("result.pdf") Catch ex As Exception Console.WriteLine(ex.Message) End Try Console.WriteLine("Press enter key to exit...") Console.ReadLine() End Sub End Module
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: