PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() Collapse AllSets a space between words.
|
| HRESULT PDFPAGE_SetWordSpacing ( DOUBLE spacing ) |
Parameters
spacing
Space between words (in points).
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.
Analogue 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


