PDFPAGE_SetTextPosition
IPDFDocument3 :: PDF page methods

See Also Example
Collapse All

This method sets the new text position.

Syntax

HRESULT PDFPAGE_SetTextPosition (
DOUBLE x,
DOUBLE y
)
Parameters
x
X-coordinate of the new text position

y
Y-coordinate of the new text position

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

Remarks

Equivalent in new interface: IPDFDocument4::SetTextPosition.

Example

Setting Text Position

Delphi
[copy to clipboard]
// PDF object is supposed to be created
PDF.BeginDoc;
PDF.PDFPAGE_SetActiveFont('Verdana', false, false, false, false, 12.0, 0);
PDF.PDFPAGE_SetTextPosition(100, 100);
PDF.PDFPAGE_TextShow('text1');
PDF.PDFPAGE_SetTextPosition(120, 120);
PDF.PDFPAGE_TextShow('text2');
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->BeginDoc();
PDF->PDFPAGE_SetActiveFont("Verdana", FALSE, FALSE, FALSE, FALSE, 12.0, 0);
PDF->PDFPAGE_SetTextPosition(100, 100);
PDF->PDFPAGE_TextShow("text1");
PDF->PDFPAGE_SetTextPosition(120, 120);
PDF->PDFPAGE_TextShow("text2");
PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.BeginDoc();
PDF.PDFPAGE_SetActiveFont("Verdana", false, false, false, false, 12.0, 0);
PDF.PDFPAGE_SetTextPosition(100, 100);
PDF.PDFPAGE_TextShow("text1");
PDF.PDFPAGE_SetTextPosition(120, 120);
PDF.PDFPAGE_TextShow("text2");
PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.BeginDoc
PDF.PDFPAGE_SetActiveFont "Verdana", False, False, False, False, 12.0, 0
PDF.PDFPAGE_SetTextPosition 100, 100
PDF.PDFPAGE_TextShow "text1"
PDF.PDFPAGE_SetTextPosition 120, 120
PDF.PDFPAGE_TextShow "text2"
PDF.EndDoc

See Also

Reference