The documentation is designed to help you to implement the features on your side. 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 draw lines and curves in PDF in your VB.NET application.
Fast application programming interfaces of ByteScout PDF SDK for VB.NET plus the instruction and the code below will help you quickly learn how to draw lines and curves in PDF. 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.
Free trial version of ByteScout PDF SDK is available for download from our website. Get it to try other source code samples for VB.NET.
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 ''' <summary> ''' This example demonstrates how to draw lines and curves. ''' </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) Dim canvas = page.Canvas Dim solidPen = New SolidPen() Dim dashedPen = New SolidPen() dashedPen.DashPattern = New DashPattern(New Single() {2, 2}) ' Draw dashed lines canvas.DrawLine(dashedPen, 100, 100, 200, 100) canvas.DrawLine(dashedPen, 200, 100, 200, 200) canvas.DrawLine(dashedPen, 200, 200, 100, 200) ' Draw besier curve by the same points canvas.DrawCurve(solidPen, 100, 100, 200, 100, 200, 200, 100, 200) ' 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
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: