SetTextPosition
IPDFDocument4 :: Page Operations :: Text

See Also Example
Collapse All

This method sets the new text position.

Syntax

HRESULT SetTextPosition (
FLOAT x,
FLOAT 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.

Example

Setting Text Position

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.SetTextPosition(10, 10);
PDF.ShowText('Text.');
PDF.SetTextPosition (20, 20);
PDF.ShowText('Text.');
PDF.SaveToFile('test.pdf', true);
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->SetTextPosition(10, 10);
PDF->ShowText("Text.");
PDF->SetTextPosition (20, 20);
PDF->ShowText("Text.");
PDF->SaveToFile("test.pdf", true);
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.SetTextPosition(10, 10);
PDF.ShowText("Text.");
PDF.SetTextPosition (20, 20);
PDF.ShowText("Text.");
PDF.SaveToFile("test.pdf", true);
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.SetTextPosition 10, 10
PDF.ShowText "Text."
PDF.SetTextPosition  20, 20
PDF.ShowText "Text."
PDF.SaveToFile "test.pdf", true

See Also

Reference