PdfSetPageCoordsBottomUp

 

This command sets the coordinate system of a pdf page.

 

Y starts with 0 at lower edge of page

 

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 '%PdfSetPageCoordsBottomUp%'

 

Example XojoScript:

 

If PdfStart("testfile.pdf") > 0 Then

 

// Set coordinate system to bottom-left as 0,0 coordinates

PdfSetPageCoordsBottomUp

 

// Set output font and color

PdfSetFont("Arial","Regular",10.0)

Call PdfSetFillColor("&c00000000") // black textcolor

 

// Set text position

Dim x As Double = 30.0

Dim y As Double = 842.0 - 30.0  // A4 height - 30.0

 

// write a text

Call PdfWriteText(x,y,"Page 1")

 

// Finalize PDF

Call PdfCloseFile

 

// Open PDF in default viewer

Call Pdflaunch

 

End If