ByteScout PDF SDK - VBScript and VB6 - Set Markup Aannotation in PDF - ByteScout

ByteScout PDF SDK – VBScript and VB6 – Set Markup Aannotation in PDF

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF SDK – VBScript and VB6 – Set Markup Aannotation in PDF

How to set markup aannotation in PDF in VBScript and VB6 and ByteScout PDF SDK

This code in VBScript and VB6 shows how to set markup aannotation in PDF with this how to tutorial

The coding tutorials are designed to help you test the features without need to write your own code. What is ByteScout PDF SDK? It 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. It can help you to set markup aannotation in PDF in your VBScript and VB6 application.

The SDK samples like this one below explain how to quickly make your application do set markup aannotation in PDF in VBScript and VB6 with the help of ByteScout PDF SDK. In order to implement the functionality, you should copy and paste this code for VBScript and VB6 below into your code editor with your app, compile and run your application. Enjoy writing a code with ready-to-use sample codes in VBScript and VB6.

You can download free trial version of ByteScout PDF SDK from our website to see and try many others source code samples for VBScript and VB6.

Try ByteScout PDF SDK today: Get 60 Day Free Trial or sign up for Web API

' This example demonstrates how to add markup annotations. ' Create Bytescout.PDF.Document object Set pdfDocument = CreateObject("Bytescout.PDF.Document") pdfDocument.RegistrationName = "demo" pdfDocument.RegistrationKey = "demo" Set comHelpers = pdfDocument.ComHelpers ' Add page Set page1 = comHelpers.CreatePage(comHelpers.PAPERFORMAT_A4) pdfDocument.Pages.Add(page1) ' Draw sample markup annotations Set squareAnnotation = comHelpers.CreateSquareAnnotation(20, 20, 80, 80) squareAnnotation.BackgroundColor = comHelpers.CreateColorRGB(255, 240, 240) squareAnnotation.BorderStyle.Style = comHelpers.BORDERSTYLE_DASHED squareAnnotation.BorderStyle.DashPattern = comHelpers.CreateDashPattern(Array(3.0, 1.0, 3.0), 0) page1.Annotations.Add(squareAnnotation) Set circleAnnotation = comHelpers.CreateCircleAnnotation(120, 20, 80, 80) circleAnnotation.BackgroundColor = comHelpers.CreateColorRGB(240, 250, 240) circleAnnotation.Color = comHelpers.CreateColorRGB(128, 0, 128) circleAnnotation.BorderEffect.Effect = comHelpers.BORDEREFFECT_CLOUDY circleAnnotation.BorderEffect.Intensity = 2 page1.Annotations.Add(circleAnnotation) Set lineAnnotation = comHelpers.CreateLineAnnotation(20, 180, 100, 120) lineAnnotation.Color = comHelpers.CreateColorRGB(255, 0, 0) lineAnnotation.StartLineStyle = comHelpers.LINEENDINGSTYLE_BUTT lineAnnotation.EndLineStyle = comHelpers.LINEENDINGSTYLE_OPENARROW page1.Annotations.Add(lineAnnotation) Set pointsArray = comHelpers.CreatePointsArray(Array(Array(120, 120), Array(130, 130), Array(140, 120), Array(150, 130), Array(160, 120), Array(170, 130))) Set polylineAnnotation = comHelpers.CreatePolylineAnnotation((pointsArray)) polylineAnnotation.BorderStyle.Width = 2 page1.Annotations.Add(polylineAnnotation) ' Save document to file pdfDocument.Save("result.pdf") ' Open document in default PDF viewer app Set shell = CreateObject("WScript.Shell") shell.Run "result.pdf", 1, false

Try ByteScout PDF SDK today: 60 Day Free Trial (on-premise version) or sign up for Web API (on demand version)



Get 60 Day Free Trial or Visit ByteScout PDF SDK page

Explore ByteScout PDF SDK documentation


Sign Up for free Web API key

Explore Web API Documentation