The
function sets a predefined page or paper format.
Parameters:
Name |
Type |
Description |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
pageFormat |
String |
Valid parameter values:
|
Returns:
Type |
Value |
Description |
Boolean |
True or
False |
Returns True if the page format 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 '%PdfSetPageFormat%'
Example
XojoScript:
If
PdfStart("testfile.pdf")
> 0 Then
// sets a predefined page
or paper format
Call PdfSetPageformat("E6") // 312.0 x
439.0
// 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,"E6
format pdf-file")
// Finalize PDF
Call PdfCloseFile
// Open PDF in default
viewer
Call PdfLaunch
End
If