



Collapse All
Syntax| HRESULT PDFPAGE_SetWordSpacing ( DOUBLE spacing ) |
RemarksThis method sets the spacing (in points) between words. Positive values will increase the spacing. Negative values will cause words to overlap.
Equivalent in new interface: IPDFDocument4::SetWordSpacing.
Example{ PDF object is supposed to be created }
PDF.BeginDoc;
PDF.PDFPAGE_SetActiveFont('Helvetica', false, false, false, false, 12.0, 0);
txt := 'Text text text.';
for i := 0 to 10 do
begin
PDF.PDFPAGE_SetWordSpacing(i);
PDF.PDFPAGE_TextOut(20, 20+i*14, 0.0, txt);
end;
PDF.EndDoc;
// PDF object is supposed to be created
PDF->BeginDoc();
PDF->PDFPAGE_SetActiveFont("Helvetica", FALSE, FALSE, FALSE, FALSE, 12.0, 0);
CString txt = "Text text text.";
for (int i = 0; i < 11; i++)
{
PDF->PDFPAGE_SetWordSpacing(i);
PDF->PDFPAGE_TextOut(20, 20+i*14, 0.0, txt);
}
PDF->EndDoc();
// PDF object is supposed to be created
PDF.BeginDoc();
PDF.PDFPAGE_SetActiveFont("Helvetica", false, false, false, false, 12.0, 0);
string txt = "Text text text.";
for (int i = 0; i < 11; i++)
{
PDF.PDFPAGE_SetWordSpacing(i);
PDF.PDFPAGE_TextOut(20, 20+i*14, 0.0, txt);
}
PDF.EndDoc();
' PDF object is supposed to be created
PDF.BeginDoc
PDF.PDFPAGE_SetActiveFont "Helvetica", False, False, False, False, 12.0, 0
txt = "Text text text."
For i = 0 To 10
PDF.PDFPAGE_SetWordSpacing i
PDF.PDFPAGE_TextOut 20, 20+i*14, 0.0, txt
Next
PDF.EndDoc
See Also