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.

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

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

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

VIDEO

ON-PREMISE VERSION

Get 60 Day Free Trial or Visit ByteScout PDF SDK page

Explore ByteScout PDF SDK documentation

WEB API

Sign Up for free Web API key

Explore Web API Documentation

Tutorials:

prev
next