LassoScript Utility
Basics Browse Detail


Tag Link [PDF_Doc->SetColor] Category PDF
Type Member Source Available Yes
Support Preferred Version 6.0
Change Updated Data Source Any
Output Type None Security File
Implementation LJAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0


[PDF_Doc->SetColor] sets the color and style for subsequent drawing operations. A required 'type' parameter specifies whether the drawing action is of type Stroke, Fill, or Both.

The color can be specified as a [PDF_Color] object or as a series of parameters.

If parameters are used then a 'color' parameter specifies a color type of Gray, RGB, or CMYK. If Gray is specified, a decimal value specifies a gray color value. If RGB is specified, three decimal values specifiy red, green and blue values, respectively. If CMYK is specified, four decimal values specifiy cyan, magenta, yellow, and black values, respectively. Color values are specified as decimals ranging from 0 to 1.0.

Note - The color (and line width) must be set before drawing occurs on each new page of the PDF.


[$PDF_Doc->(SetColor: 'stroke', (PDF_Color: 'rgb', 1.0, 0.5, 0.0))]
[$PDF_Doc->(SetColor: 'fill', (PDF_Color: 'cmyk', 1.0, 0.5, 0.0, 0.5))]

[$PDF_Doc->(SetColor: 'stroke', 'Gray', Decimal)]
[$PDF_Doc->(SetColor: 'stroke', 'RGB', Decimal, Decimal, Decimalr)]
[$PDF_Doc->(SetColor: 'stroke', 'CMYK', Decimal, Decimal, Decimal, Decimal)]


Required Parameters
Type Specifies the drawing action as Stroke, Fill, or Both.
Color Specifies a [PDF_Color] object or a string type of Gray, RGB, or CMYK.
Decimal(s) Specify color values of 0 to 1.0 for the selected color parameter.

Change Notes

The option to use the [PDF_Color] object was added in Lasso 8.5.5.


See the Lasso 8 Language Guide for examples of how to use this tag.

Related Tags

Category Tags