ByteScout PDF SDK - VBScript and VB6 - Create Text Annotation in PDF - ByteScout

ByteScout PDF SDK – VBScript and VB6 – Create Text Annotation in PDF

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF SDK – VBScript and VB6 – Create Text Annotation in PDF

How to create text annotation in PDF in VBScript and VB6 and ByteScout PDF SDK

The tutorial shows how to create text annotation in PDF in VBScript and VB6

With this source code sample you may quickly learn how to create text annotation in PDF in VBScript and VB6. What is ByteScout PDF SDK? It is the library 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 create text annotation in PDF in your VBScript and VB6 application.

This code snippet below for ByteScout PDF SDK works best when you need to quickly create text annotation in PDF in your VBScript and VB6 application. This VBScript and VB6 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! Test VBScript and VB6 sample code examples whether they respond your needs and requirements for the project.

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)

TextAnnotation.vbs
      
' This example demonstrates how to add a text annotation. ' 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) ' Add collapsed annotation (shown as a tooltip when mouse is over the icon) Set collapsedAnnotation = comHelpers.CreateTextAnnotation(20, 20) collapsedAnnotation.Color = comHelpers.CreateColorRGB(255, 255, 0) collapsedAnnotation.Icon = comHelpers.TEXTANNOTATIONICON_COMMENT collapsedAnnotation.Author = "Mr. Important" collapsedAnnotation.Contents = "The quick brown fox jumps over the lazy dog." page1.Annotations.Add(collapsedAnnotation) ' Add expanded annotation Set expandedAnnotation = comHelpers.CreateTextAnnotation(20, 50) expandedAnnotation.Color = comHelpers.CreateColorRGB(255, 0, 0) expandedAnnotation.Icon = comHelpers.TEXTANNOTATIONICON_NOTE expandedAnnotation.Open = True expandedAnnotation.Author = "John Doe" expandedAnnotation.Contents = "The quick brown fox jumps over the lazy dog." page1.Annotations.Add(expandedAnnotation) ' 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

ON-PREMISE OFFLINE SDK

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

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 SDK Home Page

Explore ByteScout PDF SDK Documentation

Explore Samples

Sign Up for ByteScout PDF SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next