ByteScout PDF SDK - VBScript and VB6 - Enable Superscript or Subscript for Text in PDF - ByteScout

ByteScout PDF SDK – VBScript and VB6 – Enable Superscript or Subscript for Text in PDF

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF SDK – VBScript and VB6 – Enable Superscript or Subscript for Text in PDF

enable superscript or subscript for text in PDF in VBScript and VB6 and ByteScout PDF SDK

enable superscript or subscript for text in PDF in VBScript and VB6

Writing of the code to enable superscript or subscript for text in PDF in VBScript and VB6 can be done by developers of any level using ByteScout PDF SDK. ByteScout PDF SDK helps with enable superscript or subscript for text in PDF in VBScript and VB6. ByteScout PDF SDK 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.

You will save a lot of time on writing and testing code as you may just take the code below and use it in your application. VBScript and VB6 sample code is all you need: copy and paste the code to your VBScript and VB6 application’s code editor, add a reference to ByteScout PDF SDK (if you haven’t added yet) and you are ready to go! Use of ByteScout PDF SDK in VBScript and VB6 is also explained in the documentation included along with the product.

On our website you may get trial version of ByteScout PDF SDK for free. Source code samples are included to help you with your VBScript and VB6 application.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

SuperscripAndSubscript.vbs
      
' This example demonstrates how to create a document and save it to file. ' 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) Set font = comHelpers.CreateSystemFont("Arial", 16) Set brush = comHelpers.CreateSolidBrush(comHelpers.CreateColorGray(0)) Set stringFormat = comHelpers.CreateStringFormat() xPosition = 20 ' Draw normal string page1.Canvas.DrawString_4 "Normal text ", (font), (brush), xPosition, 50, (stringFormat) xPosition = xPosition + font.GetTextWidth("Normal text ") ' Draw subscript string stringFormat.Rise = -5 page1.Canvas.DrawString_4 "Subscript", (font), (brush), xPosition, 50, (stringFormat) xPosition = xPosition + font.GetTextWidth("Subscript") ' draw superscript string stringFormat.Rise = +5 page1.Canvas.DrawString_4 "Superscript", (font), (brush), xPosition, 50, (stringFormat) xPosition = xPosition + font.GetTextWidth("Superscript") ' Draw the baseline Set pen = comHelpers.CreateSolidPen(comHelpers.CreateColorRGB(0, 0, 255), 1.0) pen.Opacity = 50 page1.Canvas.DrawLine (pen), 20, 50 + font.Size, xPosition, 50 + font.Size ' 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