ByteScout PDF SDK - VB.NET - Set Intercharacter Spacing for Text in PDF - ByteScout

ByteScout PDF SDK – VB.NET – Set Intercharacter Spacing for Text in PDF

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF SDK – VB.NET – Set Intercharacter Spacing for Text in PDF

How to set intercharacter spacing for text in PDF in VB.NET and ByteScout PDF SDK

The tutorial shows how to set intercharacter spacing for text in PDF in VB.NET

On this page you will learn from code samples for programming in VB.NET.Writing of the code to set intercharacter spacing for text in PDF in VB.NET can be done by developers of any level using ByteScout PDF SDK. ByteScout PDF SDK 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 set intercharacter spacing for text in PDF in VB.NET.

This rich sample source code in VB.NET for ByteScout PDF SDK includes the number of functions and options you should do calling the API to set intercharacter spacing for text in PDF. This VB.NET 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! Enjoy writing a code with ready-to-use sample codes in VB.NET.

Free trial version of ByteScout PDF SDK is available for download from our website. Get it to try other source code samples for VB.NET.

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 Bytescout.PDF ''' <summary> ''' This example demonstrates how to change the intercharacter spacing. ''' </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) Dim canvas = page.Canvas Dim font = New Font("Arial", 16) Dim brush = New SolidBrush() Dim stringFormat = New StringFormat() ' Standard spacing stringFormat.CharacterSpacing = 0.0F canvas.DrawString("Standard intercharacter spacing 0.0", font, brush, 20, 20, stringFormat) ' Increased spacing stringFormat.CharacterSpacing = 1.0F canvas.DrawString("Increased intercharacter spacing 1.0", font, brush, 20, 50, stringFormat) ' Reduced spacing stringFormat.CharacterSpacing = -0.75F canvas.DrawString("Reduced intercharacter spacing -0.75", font, brush, 20, 80, stringFormat) ' 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 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