Source code documentation samples provide quick and easy way to add a required functionality into your application. What is ByteScout PDF SDK? It is the SDK for pdf documents generation, modification and updates. Can also generate and fill PDF forms. Provides support for text (fonts, style, size, font family), layers, pdf form fields, vector and raster drawings. It can help you to load existing PDF document in your VB.NET application.
This code snippet below for ByteScout PDF SDK works best when you need to quickly load existing PDF document in your VB.NET application. 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! Code testing will allow the function to be tested and work properly with your data.
You can download free trial version of ByteScout PDF SDK from our website to see and try many others source code samples for VB.NET.
Imports Bytescout.PDF ''' <summary> ''' This example demonstrates how to load and modify an existing document. ''' </summary> Class Program Shared Sub Main() ' Create new Document object Dim pdfDocument = New Document() pdfDocument.RegistrationName = "demo" pdfDocument.RegistrationKey = "demo" ' Load existing document pdfDocument.Load("sample.pdf") ' Add new page to loaded document Dim page As New Page(PaperFormat.A4) Dim font As New Font(StandardFonts.Times, 24) Dim brush As New SolidBrush() page.Canvas.DrawString("New Page", font, brush, 20, 20) pdfDocument.Pages.Add(page) ' Save document to file pdfDocument.Save("result.pdf") ' Cleanup pdfDocument.Dispose() ' Open document in default PDF viewer app Process.Start("result.pdf") End Sub End Class