PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() Collapse AllThis method sets the spacing between words.
|
| HRESULT PDFPAGE_SetWordSpacing ( DOUBLE 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 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
Setting Word Spacing
Delphi
[copy to clipboard]
{ 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;
C/C++
[copy to clipboard]
// 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();
C#
[copy to clipboard]
// 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();
Visual Basic
[copy to clipboard]
' 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


