The
function moves the current drawing position to the point specified by x, y.
This
function must be called before a line or curved path segment can be drawn.
If the
coordinate system is bottom-up the point X, Y defines the lower left corner of
the bounding rectangle.
If the
coordinate system is top-down it defines the upper left corner.
Parameters:
Name |
Type |
Description |
x1 |
Double |
New drawing
position, from Left in points |
y1 |
Double |
New
drawing position, from Top in points (If PdfSetPageCoordsTopDown is set) New
drawing position, from Bottom in points (If PdfSetPageCoordsBottomUp is
set) |
Returns:
Type |
Value |
Description |
Boolean |
True or
False |
Returns True if the position has been set. Returns False upon failure |
Available
in:
WindowMain |
WindowLink |
YES |
YES |
Hint: You can
find references to XojoScripts which make use of this function by sending the following
SQL statement to the database:
Select id,GUID, ScriptName,ScriptCode from
im_scripts where ScriptCode Like '%PdfMoveTo%'
Example
XojoScript:
If
PdfStart("testfile.pdf")
> 0 Then
// Set top top-left as
0,0 coordinates
PdfSetPageCoordsTopDown
Dim x,y As Double = 30.0
// Set output font and
color
PdfSetFont("Arial","Regular",10.0)
Call PdfSetFillColor("&c00000000")
// black textcolor
// write a location and
current date
Call PdfWriteText(x,y,"Page
1")
// Set new drawing
position with indent
Call PdfMoveTo(x+20,y+30)
// draw a line underneath
Call PdfWriteFText("LEFT","Second line of text")
// Finalize PDF
Call PdfcloseFile
// Open PDF in default
viewer
Call Pdflaunch
End
If