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.5
7.0
7.1
7.2
7.3
7.4
7.5
8.0
8.1
8.2
Statistic
DynaPDF.SetColorSpace
The function activates a device color space in the graphics state.
Component | Version | macOS | Windows | Server | FileMaker Cloud | FileMaker iOS SDK |
DynaPDF | 3.3 | Yes | Yes | Yes | Yes | Yes |
MBS( "DynaPDF.SetColorSpace"; PDF; Value )
Parameters
Parameter | Description | Example value |
---|---|---|
The PDF reference returned from DynaPDF.New. | ||
Value | The new colorspace. Can be DeviceRGB, DeviceCMYK or DeviceGray. | "DeviceGray" |
Result
Returns OK on success or error message.
Description
The function activates a device color space in the graphics state.All color values must be defined in the current color space. Images or EMF graphics are automatically converted to the current color space. The default color conversion rules can be modified with the function DynaPDF.SetGStateFlags.
Extended color spaces can be set with DynaPDF.SetExtColorSpace, DynaPDF.SetExtFillColorSpace, and DynaPDF.SetExtStrokeColorSpace.
See also DynaPDF.GetColorSpace.
See also SetColorSpace function in DynaPDF manual.
Examples
Set to RGB:
MBS( "DynaPDF.SetColorSpace"; $PDF; "DeviceRGB" )
Set to CMYK:
MBS( "DynaPDF.SetColorSpace"; $PDF; "DeviceCMYK" )
Write in CMYK:
# switch to CMYK
Variable setzen [$r; Wert:MBS( "DynaPDF.SetColorSpace"; $pdf; "DeviceCMYK" )]
# set color to Cyan
Variable setzen [$r; Wert:MBS("DynaPDF.SetFillColor"; $pdf; 1; 0; 0; 0)]
# Write some text
Variable setzen [$r; Wert:MBS("DynaPDF.WriteText"; $pdf; 100; $x; "Some cyan text")]
# now switch back to RGB
Variable setzen [$r; Wert:MBS( "DynaPDF.SetColorSpace"; $pdf; "DeviceRGB" )]
See also
- DynaPDF.CreateSeparationCS
- DynaPDF.GetColorSpace
- DynaPDF.GetColorSpaceCount
- DynaPDF.GetColorSpaceInfo
- DynaPDF.GetFieldBackColor
- DynaPDF.GetFieldBorderColor
- DynaPDF.HighlightAnnot
- DynaPDF.New
- DynaPDF.SetExtColorSpace
- DynaPDF.SetExtFillColorSpace
- DynaPDF.SetExtStrokeColorSpace
- DynaPDF.SetFillColor
- DynaPDF.SetGStateFlags
- DynaPDF.WriteText
Example Databases
- DynaPDF/Create PDF with Bezier Curves
- DynaPDF/Picture to PDF with navigation
- DynaPDF/Watermark pages
DynaPDF.SetCheckBoxState - DynaPDF.SetCompressionFilter
Feedback: Report problem or ask question.
Links
MBS Xojo Chart Plugins