PdfChangeFontSize(size As Double) As Boolean

 

Change size of current font in pdf.

 

Description: Macbook HD:Users:oliver:Desktop:Screen Shot 2016-01-21 at 16.07.23.png

 

Parameters:

 

Name

Type

Description

size

Double

New size for the previously defined font

 

Returns:

 

Type

Value

Description

Boolean

True or False

Returns True if the fontsize has successfully been changed on current pdf page

 

Available in:

 

WindowMain

WindowLink

YES

YES

 

Used in:

 

XojoScript Name

GUID

Create Seminar Invoice As PDF

2C3F7F29-A29A-4338-ACF5-51894B709DA5

Create Seminar Invoice With Slip As PDF

739DA58E-17EE-41CE-BB54-E7362CFE17D4

 

 

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

 

Example XojoScript:

 

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

MsgBox "PDF creation of PDF failed!"

Return

End If

 

PdfSetPageCoordsTopDown

Dim x,y As Double = 30.0

 

// Set output font:

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

 

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

 

// write a location and current date

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

 

// Change font size to 18

Call PdfChangefontSize(18.0)

 

Call PdfWriteText(x,50.0,"New Size")

 

// Finalize PDF

Call PdfcloseFile

 

// Show it to the user

Call pdflaunch