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

DynaPDF.Table.SetFlags

The function sets various flags.

Component Version macOS Windows Linux Server iOS SDK
DynaPDF 3.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "DynaPDF.Table.SetFlags"; Table; Row; Col; Flags )   More

Parameters

Parameter Description Example
Table The identifier for the table. $Table
Row The row number. Range from 0 to DynaPDF.Table.GetNumRows-1. Pass -1 for all rows. 0
Col The column number. Range from 0 to DynaPDF.Table.GetNumCols-1. Pass -1 for all columns. 0
Flags The flags to set. Can be string identifier or the numerical values. "HeaderRow"

Result

Returns OK or error message.

Description

The function sets various flags.
Flags are inherited from the table, column, and rows, in this order.

StaticThis flag avoids the deletion of cell contents when DynaPDF.Table.ClearContent, DynaPDF.Table.ClearColumn or DynaPDF.Table.ClearRow is called. The flag can be set to rows, columns, and cells.
HeaderRowHeader rows are the first rows which are drawn after a page break occurred. It is possible to mark more than one row as header row.
NoLineBreakThis flag avoids line breaks in cells which contain text. The flag is inherited from the table, columns, and rows. Text is output with WriteText() if this flag is set. See DynaPDF.Table.SetCellText for further information.
ScaleToRectIf set, images and templates are scaled into the cell so that both sides fit into the given width and height. The aspect ratio will be preserved. The flag is inherited from the table, columns, and rows.
UseImageCSIf set, images are inserted in the native image color space and embedded ICC profiles will be considered. The flag is inherited from the table, columns, and rows.

Added new flag FixedTextHeight for v11.5:
If set, text does not increase the row height if necessary. The row height must be non-zero in this case.

Examples

Sets the HeaderRow flag for a row:

MBS("DynaPDF.Table.SetFlags"; $table; $row; -1; "HeaderRow")

Adds a header row:

#Add header row
Set Variable [$row; Value:MBS("DynaPDF.Table.AddRow"; $table)]
Set Variable [$r; Value:MBS("DynaPDF.Table.SetCellText"; $table; $row; 0; "right"; "top"; "Index")]
Set Variable [$r; Value:MBS("DynaPDF.Table.SetCellText"; $table; $row; 1; "left"; "top"; "Product")]
Set Variable [$r; Value:MBS("DynaPDF.Table.SetCellText"; $table; $row; 2; "right"; "top"; "Price")]
Set Variable [$r; Value:MBS("DynaPDF.Table.SetCellText"; $table; $row; 3; "right"; "top"; "Quantity")]
Set Variable [$r; Value:MBS("DynaPDF.Table.SetCellText"; $table; $row; 4; "right"; "top"; "Total Price")]
# set flag for header row
Set Variable [$r; Value:MBS("DynaPDF.Table.SetFlags"; $table; $row; -1; "HeaderRow")]
# make row bold
Set Variable [$r; Value:MBS("DynaPDF.Table.SetFont"; $table; $row; -1; "Helvetica"; 2; 1; "unicode")]

No line breaks in first column:

MBS("DynaPDF.Table.SetFlags"; $table; -1; 0; "NoLineBreak")

See also

Release notes

Example Databases

Blog Entries

This function checks for a license.

Created 18th August 2014, last changed 24th October 2021


DynaPDF.Table.SetColorFloat - DynaPDF.Table.SetFont