PDFPAGE_TextOut
IPDFDocument3 :: PDF page methods

See Also Example
Collapse All

This method draws text in a PDF document starting from a specified position.

Syntax

HRESULT PDFPAGE_TextOut (
DOUBLE x,
DOUBLE y,
DOUBLE orientation,
BSTR text
)
Parameters
x
X coordinate of the text position

y
Y coordinate of the text position

orientation
Angle of the text

text
Text to be displayed

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

Remarks

This method draws an ASCII text string (using the current font) starting at location (x, y) and at angle orientation (in degrees).

Equivalent in new interface: IPDFDocument4::ShowTextAt.

Example

Drawing Text

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
PDF.PDFPAGE_SetActiveFont('Helvetica', false, false, false, false, 12.0, 0);
PDF.PDFPAGE_TextOut(20, 20, -15, 'Text');
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);
PDF->PDFPAGE_TextOut(20, 20, -15, "Text");
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);
PDF.PDFPAGE_TextOut(20, 20, -15, "Text");
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
PDF.PDFPAGE_TextOut 20, 20, -15, "Text"
PDF.EndDoc

See Also

Reference