Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 8.4   8.5   9.0   9.1   9.2   9.3   9.4   9.5   10.0   10.1    Statistic  


Writes text on current page with formatting commands.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
DynaPDF 3.1 Yes Yes Yes Yes Yes
MBS( "DynaPDF.WriteFText"; PDF; Align; Text { ; PlainText } )   More


Parameter Description Example value
PDF The PDF reference returned from DynaPDF.New. $pdf
Align The text alignment. Can be left, center, right or justify. "left"
Text The text to write. "Hello World"
PlainText Optional
Available in MBS FileMaker Plugin 9.1 or newer.
Pass 1 to ignore formatting commands and treat text as plain text.
Default is 0 to interpret commands in text.


Returns OK or error message.


Writes text on current page with formatting commands.
Use DynaPDF.GetFTextHeightEx or DynaPDF.GetFTextHeight to calculate the space needed for the text if you want to create a matching text rectangle for vertical alignment.

See DynaPDF.AllowPageBreak for whether to do page breaks or not.

Please set a font first with DynaPDF.SetFont function before you write on the page.
See DynaPDF.WriteStyledText and DynaPDF.WriteStyledTextEx to convert FileMaker styles to DynaPDF commands.

See also WriteFText function in DynaPDF manual.


Writes some text:

MBS( "DynaPDF.WriteFText"; $PDF; "center"; "Hello World" )

Write text with font changing:

# Write some formatted text
Set Variable [ $text ; Value: "Some text. \FT[Times-Bold]Now Times in bold!\FT[Times-Roman] and back to normal Times." ]
Set Variable [ $r ; Value: MBS("DynaPDF.SetTextRect"; $pdf; 200; 200; 150; -1) ]
Set Variable [ $r ; Value: MBS("DynaPDF.WriteFText"; $pdf; "left"; $text) ]

See also

Example Databases

Blog Entries

Release notes

Created 18th August 2014, last changed 6th February 2019

DynaPDF.WriteDemoText   -   DynaPDF.WriteFTextEx

Feedback: Report problem or ask question.

MBS Xojo Plugins