This sample shows how to change word spacing using PdfCanvas.WordSpacing property.

Word spacing defines a distance between adjacent words in a line of text.

C#
using System.Diagnostics;

namespace BitMiracle.Docotic.Pdf.Samples
{
    public static class WordSpacing
    {
        public static void Main()
        {
            // NOTE: 
            // When used in trial mode, the library imposes some restrictions.
            // Please visit http://bitmiracle.com/pdf-library/trial-restrictions.aspx
            // for more information.

            string pathToFile = "WordSpacing.pdf";

            using (PdfDocument pdf = new PdfDocument())
            {
                const string sampleText = "Lorem ipsum dolor sit amet, consectetur adipisicing elit";
                PdfCanvas canvas = pdf.Pages[0].Canvas;

                canvas.WordSpacing = 1;
                canvas.DrawString(10, 50, sampleText);

                canvas.WordSpacing = 4;
                canvas.DrawString(10, 60, sampleText);

                canvas.WordSpacing = 10;
                canvas.DrawString(10, 70, sampleText);

                pdf.Save(pathToFile);
            }

            Process.Start(pathToFile);
        }
    }
}
VB
Imports System.Diagnostics

Imports BitMiracle.Docotic.Pdf

Namespace BitMiracle.Docotic.Pdf.Samples
    Public NotInheritable Class WordSpacing
        Public Shared Sub Main()
            ' NOTE: 
            ' When used in trial mode, the library imposes some restrictions.
            ' Please visit http://bitmiracle.com/pdf-library/trial-restrictions.aspx
            ' for more information.

            Dim pathToFile As String = "WordSpacing.pdf"

            Using pdf As New PdfDocument()

                Const sampleText As String = "Lorem ipsum dolor sit amet, consectetur adipisicing elit"
                Dim canvas As PdfCanvas = pdf.Pages(0).Canvas

                canvas.WordSpacing = 1
                canvas.DrawString(10, 50, sampleText)

                canvas.WordSpacing = 4
                canvas.DrawString(10, 60, sampleText)

                canvas.WordSpacing = 10
                canvas.DrawString(10, 70, sampleText)

                pdf.Save(pathToFile)
            End Using

            Process.Start(pathToFile)
        End Sub
    End Class
End Namespace