ByteScout PDF Suite - VB.NET - Use markup for annotations in pdf with pdf sdk - ByteScout

ByteScout PDF Suite – VB.NET – Use markup for annotations in pdf with pdf sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Suite – VB.NET – Use markup for annotations in pdf with pdf sdk

How to use markup for annotations in pdf with pdf sdk in VB.NET and ByteScout PDF Suite

How to write a robust code in VB.NET to use markup for annotations in pdf with pdf sdk with this step-by-step tutorial

On this page you will learn from code samples for programming in VB.NET.Writing of the code to use markup for annotations in pdf with pdf sdk in VB.NET can be executed by programmers of any level using ByteScout PDF Suite. ByteScout PDF Suite is the set that includes 6 SDK products to work with PDF from generating rich PDF reports to extracting data from PDF documents and converting them to HTML. This bundle includes PDF (Generator) SDK, PDF Renderer SDK, PDF Extractor SDK, PDF to HTML SDK, PDF Viewer SDK and PDF Generator SDK for Javascript. It can be applied to use markup for annotations in pdf with pdf sdk using VB.NET.

Want to save time? You will save a lot of time on writing and testing code as you may just take the VB.NET code from ByteScout PDF Suite for use markup for annotations in pdf with pdf sdk below and use it in your application. Follow the instructions from scratch to work and copy the VB.NET code. Complete and detailed tutorials and documentation are available along with installed ByteScout PDF Suite if you’d like to learn more about the topic and the details of the API.

The trial version of ByteScout PDF Suite can be downloaded for free from our website. It also includes source code samples for VB.NET and other programming languages.

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 add markup annotations. ''' </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) ' Draw sample markup annotations Dim squareAnnotation = New SquareAnnotation(20, 20, 80, 80) squareAnnotation.BackgroundColor = New ColorRGB(255, 240, 240) squareAnnotation.BorderStyle.Style = BorderStyle.Dashed squareAnnotation.BorderStyle.DashPattern = New DashPattern(New Single() {3, 1, 3}) page.Annotations.Add(squareAnnotation) Dim circleAnnotation = New CircleAnnotation(120, 20, 80, 80) circleAnnotation.BackgroundColor = New ColorRGB(240, 250, 240) circleAnnotation.Color = New ColorRGB(128, 0, 128) circleAnnotation.BorderEffect.Effect = BorderEffect.Cloudy circleAnnotation.BorderEffect.Intensity = 2 page.Annotations.Add(circleAnnotation) Dim lineAnnotation = New LineAnnotation(20, 180, 100, 120) lineAnnotation.Color = New ColorRGB(255, 0, 0) lineAnnotation.StartLineStyle = LineEndingStyle.Butt lineAnnotation.EndLineStyle = LineEndingStyle.OpenArrow page.Annotations.Add(lineAnnotation) Dim pp = {New PointF(120, 120), New PointF(130, 130), New PointF(140, 120), New PointF(150, 130), New PointF(160, 120), New PointF(170, 130)} Dim points = New PointsArray(pp) Dim polylineAnnotation = New PolylineAnnotation(points) polylineAnnotation.BorderStyle.Width = 2 page.Annotations.Add(polylineAnnotation) ' 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

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite 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 Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next