Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
11.0
11.1
11.2
11.3
11.4
11.5
12.0
12.1
12.2
12.3
Statistic
FMM
Blog
DynaPDF.WriteText
Writes text on current page.
Component | Version | macOS | Windows | Linux | Server | iOS SDK | License |
DynaPDF | 3.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | Paid |
Parameters
Parameter | Description | Example |
---|---|---|
The PDF reference returned from DynaPDF.New. | ||
PosX | X-Coordinate of the text | $x |
PosY | Y-Coordinate of the text | $y |
Text | The text to write. | "Hello World" |
Result
Returns OK or error message.
Description
Writes text on current page.Please set a font first with DynaPDF.SetFont function before you write on the page.
See also WriteText function in DynaPDF manual.
Examples
Write something:
MBS("DynaPDF.WriteText"; $pdf; 111; 323; Invoice::Invoice ID)
Draw text over rectangle:
# where?
Set Variable [ $x ; Value: 100 ]
Set Variable [ $y ; Value: 100 ]
# the text
Set Variable [ $text ; Value: "Some blue text" ]
# set the font before measuring
Set Variable [ $r ; Value: MBS("DynaPDF.SetFont"; $pdf; "Helvetica"; 0; 12) ]
# measure now
Set Variable [ $width ; Value: MBS( "DynaPDF.GetTextWidth"; $pdf; $text ) ]
# draw rectangle width some addition 5 point margin
Set Variable [ $r ; Value: MBS("DynaPDF.SetFillColor"; $pdf; ,8; ,8; ,8) // light gray ]
Set Variable [ $r ; Value: MBS( "DynaPDF.Rectangle"; $pdf; $x - 5; $y - 5 - 2; $width + 10; 5 + 12 + 5; "fill") ]
# and draw text on top
Set Variable [ $r ; Value: MBS("DynaPDF.SetFillColor"; $pdf; 0; 0; 1) // 100% blue ]
Set Variable [ $r ; Value: MBS("DynaPDF.WriteText"; $pdf; 100; $x; $text) ]
Write checkmark:
Set Variable [ $r ; Value: MBS("DynaPDF.SetFont"; $pdf; "Zapf Dingbats"; 0; 12) ]
Set Variable [ $r ; Value: MBS("DynaPDF.WriteText"; $pdf; 100; $x; Char(10004)) // "✔︎"
See also
- DynaPDF.EnableEncryption
- DynaPDF.FindText
- DynaPDF.GetTextWidth
- DynaPDF.New
- DynaPDF.Rectangle
- DynaPDF.SetFillColor
- DynaPDF.WebLink
- DynaPDF.WriteDemoText
- DynaPDF.WriteFText
- DynaPDF.WriteFTextEx
Example Databases
FileMaker Magazin
Created 18th August 2014, last changed 22nd May 2021
DynaPDF.WriteStyledTextExRotated - ECKey.BuiltInCurves
Feedback: Report problem or ask question.
