Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

DynaPDF.SetTextRect

The function defines the output rectangle that is used to output formatted text by the function DynaPDF.WriteFText.

Component Version macOS Windows Linux Server iOS SDK
DynaPDF 3.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "DynaPDF.SetTextRect"; PDF; PosX; PosY; Width; Height )   More

Parameters

Parameter Description Example
PDF The PDF reference returned from DynaPDF.New. $pdf
PosX X-Coordinate of output rectangle $x
PosY Y-Coordinate of output rectangle $y
Width Width of output rectangle $w
Height Height of output rectangle or -1. $h

Result

Returns OK or error message.

Description

The function defines the output rectangle that is used to output formatted text by the function DynaPDF.WriteFText.

See also SetTextRect function in DynaPDF manual.

Examples

Write some text in a rectangle area:

#Add page with some text
Set Variable [$r; Value:MBS("DynaPDF.AppendPage"; $pdf)]
Set Variable [$r; Value:MBS("DynaPDF.SetTextRect"; $pdf; 100; 100; 400; 200)]
Set Variable [$r; Value:MBS("DynaPDF.SetFont"; $pdf; "Times"; 1; 40; 1; "cp1252")]
Set Variable [$r; Value:MBS("DynaPDF.WriteFText"; $pdf; "Center"; "Just a test PDF.")]
Set Variable [$r; Value:MBS("DynaPDF.EndPage"; $pdf)]

See also

Example Databases

Blog Entries

This function checks for a license.

Created 18th August 2014, last changed 27th May 2017


DynaPDF.SetTextFieldValueEx - DynaPDF.SetTextRise