Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5    Statistic  

DynaPDF.SetFieldFont

Sets or changes the font of a form field.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
DynaPDF 5.1 Yes Yes Yes Yes Yes

MBS( "DynaPDF.SetFieldFont"; PDF; Field; Name; Style; Size; Embed; CodePage )

Parameters

Parameter Description Example value
PDF The PDF reference returned from DynaPDF.New. $pdf
Field The field index or field name. "FirstName"
Name Font name for new font to set or empty text to deactivate current font. "Arial"
Style Font style value. Can be a combination of values 1 for italic, 2 for bold, 4 for underlined and 8 for striked. 3
Size Font size in points. 12
Embed Whether to embed font in PDF. Can be 1 to embed or 0 to not embed. 1
CodePage The code page to use. Default is 1252 for Windows ANSI. Code page can be 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258, 8859-2, 8859-3, 8859-4, 8859-5, 8859-6, 8859-7, 8859-8, 8859-9, 8859-10, 8859-13, 8859-14, 8859-15, 8859-16, Symbol, 437, 737, 775, 850, 852, 855, 857, 860, 861, 862, 863, 864, 865, 866, 869, 874, Unicode "Unicode"

Result

Returns OK or error.

Description

Sets or changes the font of a form field.
Form fields support natively only the code pages 1252 and MacRoman.
See dynapdf_help manual for details.
You need to set CMap directory first with DynaPDF.SetCMapDir.

See also SetFieldFont function in DynaPDF manual.

Examples

Set unicode font:

Variable setzen [ $r ; Wert: MBS( "DynaPDF.SetCMapDir"; $pdf; "/Users/cs/Desktop/CMap"; "Recursive" ) ]
Variable setzen [ $r ; Wert: MBS( "DynaPDF.SetFieldFont"; $pdf; "Test"; "Arial"; 0; 12; 1; "Unicode") ]
Variable setzen [ $r ; Wert: MBS("DynaPDF.SetTextFieldValue"; $pdf; "Test"; "你好世界"; ""; "Left") ]

See also


DynaPDF.SetFieldFlags   -   DynaPDF.SetFieldFontEx

Feedback: Report problem or ask question.




Links
MBS Xojo PDF Plugins