SetWordSpacing
IPDFDocument4 :: Page Operations :: Text

See Also Example
Collapse All

This method sets a space between words.

Syntax

HRESULT SetWordSpacing (
FLOAT spacing
)
Parameters
spacing
Space (in points) between words

Return value
If successful, this method returns S_OK. If it fails, this method should return one of the error values.

Remarks

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

Example

Setting Word Spacing

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
for i := 0 to 10 do
begin
    PDF.SetWordSpacing(i);
    PDF.ShowTextAt(20, 20+i*14, 'Text text text.');
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->SetWordSpacing(i);
    PDF->ShowTextAt(20, 20+i*14, "Text text text.");
}
PDF->SaveToFile("test.pdf", true);
C#
[copy to clipboard]
// PDF object is supposed to be created
for (int i = 0;  i < 11; i++)
{
    PDF.SetWordSpacing(i);
    PDF.ShowTextAt(20, 20+i*14, "Text text text.");
}
PDF.SaveToFile("test.pdf", true);
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
For i = 0 To 10
    PDF.SetWordSpacing i
    PDF.ShowTextAt 20, 20+i*14, "Text text text."
Next
PDF.SaveToFile "test.pdf", true

See Also

Reference