SetCharacterSpacing
IPDFDocument4 :: Page Operations :: Text

See Also Example
Collapse All

This method sets the space between characters.

Syntax

SetCharacterSpacing (
FLOAT spacing
)
Parameters
spacing
Space (in points) between characters

Remarks

This method sets the additional space in points that should be inserted between characters.

Example

Different Character Spacing

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
for i := 0 to 10 do
begin
    PDF.SetCharacterSpacing(i * 2);
    PDF.ShowTextAt(20, (i + 1)*15, 'Some text string.');
end;
PDF.SaveToFile('test.pdf', true);
C/C++
[copy to clipboard]
// PDF object is supposed to be created
for (int i = 0; i < 11; i ++)
{
    PDF->SetCharacterSpacing(i * 2);
    PDF->ShowTextAt(20, (i + 1)*15, "Some text string.");
}
PDF->SaveToFile("test.pdf", true);
C#
[copy to clipboard]
// PDF object is supposed to be created
for (int i = 0; i < 11; i ++)
{
    PDF.SetCharacterSpacing(i * 2);
    PDF.ShowTextAt(20, (i + 1)*15, "Some text string.");
}
PDF.SaveToFile("test.pdf", true);
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
For i = 0 To 10
    PDF.SetCharacterSpacing i * 2
    PDF.ShowTextAt 20, (i + 1)*15, "Some text string."
Next
PDF.SaveToFile "test.pdf", true

See Also

Reference