Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
DynaPDF.Table.SetColorFloat
Sets or changes the specified color and color space.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
DynaPDF | 3.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "DynaPDF.Table.SetColorFloat"; Table; Row; Col; Type; CS; CSHandle; Colors ) 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 |
Type | Which table color. Can be BackColor, BorderColor, GridHorzColor, GridVertColor, ImageColor or TextColor. | "TextColor" |
CS | The colorspace to use. Can be DeviceRGB, DeviceCMYK, DeviceGray. | "DeviceRGB" |
CSHandle | Color space handle of non-device color space. | |
Colors | Color values. Pass as many parameters as needed. Range from 0 to 1. | 0 |
Result
Returns OK or error.
Description
Sets or changes the specified color and color space.The number of color components must match the number of components of the color space. The text color is inherited from the table, column, and row, in this order. The border color is inherited from columns and rows but not from the table since the table has its own border.
Extended color spaces will be deleted when the PDF file in memory is closed or when DynaPDF.Release was called. The color spaces must be recreated when the table should be drawn in another PDF file. Color space handles may change when recreated in another PDF file. All such colors should be set again to avoid issues with invalid color space handles.
Width exception of Lab colors, color values are in the range 0 through 1. Lab colors support different ranges for the L*, a*, and b* components:
L*-> 0..100
a* -> -128 .. 127
b* -> -128 .. 127
Examples
Set green text color:
MBS( "DynaPDF.Table.SetColorFloat"; $table; $Row; $Col; "TextColor"; "DeviceRGB"; 0; 1; 0 )
See also
- DynaPDF.Release
- DynaPDF.Table.GetNumCols
- DynaPDF.Table.GetNumRows
- DynaPDF.Table.SetBoxProperty
- DynaPDF.Table.SetCellAction
- DynaPDF.Table.SetCellTemplate
- DynaPDF.Table.SetCellText
- DynaPDF.Table.SetColor
- DynaPDF.Table.SetColWidth
- DynaPDF.Table.SetGridWidth
Release notes
- Version 12.0
- Documented missing color space handle parameter for DynaPDF.Table.SetColorFloat function.
Blog Entries
This function checks for a license.
Created 18th August 2014, last changed 10th December 2021