ByteScout PDF SDK - VBScript and VB6 - Set Inter-Character Spacing for Text in PDF - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout PDF SDK – VBScript and VB6 – Set Inter-Character Spacing for Text in PDF

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF SDK – VBScript and VB6 – Set Inter-Character Spacing for Text in PDF

How to set inter character spacing for text in PDF in VBScript and VB6 and ByteScout PDF SDK

This code in VBScript and VB6 shows how to set inter character spacing for text in PDF with this how to tutorial

Set inter character spacing for text in PDF is easy to implement in VBScript and VB6 if you use these source codes below. ByteScout PDF SDK is the pdf library that can create, update and modify PDF files. Supports text with fonts and style selections, layers, form fields, drawing lines and objects, automatic tables, images. Can be used to create and fill pdf forms. It can be used to set inter character spacing for text in PDF using VBScript and VB6.

This code snippet below for ByteScout PDF SDK works best when you need to quickly set inter character spacing for text in PDF in your VBScript and VB6 application. Follow the instructions from the scratch to work and copy the VBScript and VB6 code. This basic programming language sample code for VBScript and VB6 will do the whole work for you to set inter character spacing for text in PDF.

ByteScout PDF SDK free trial version is available on our website. VBScript and VB6 and other programming languages are supported.

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

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

IntercharacterSpacing.vbs
      
' This example demonstrates how to change the intercharacter spacing. ' 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 canvas = page1.Canvas Set font = comHelpers.CreateSystemFont("Arial", 16) Set brush = comHelpers.CreateSolidBrush(comHelpers.CreateColorGray(0)) Set stringFormat = comHelpers.CreateStringFormat() ' Standard spacing stringFormat.CharacterSpacing = 0.0 canvas.DrawString_4 "Standard intercharacter spacing 0.0", (font), (brush), 20, 20, (stringFormat) ' Increased spacing stringFormat.CharacterSpacing = 1.0 canvas.DrawString_4 "Increased intercharacter spacing 1.0", (font), (brush), 20, 50, (stringFormat) ' Reduced spacing stringFormat.CharacterSpacing = -0.75 canvas.DrawString_4 "Reduced intercharacter spacing -0.75", (font), (brush), 20, 80, (stringFormat) ' 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