DynaPDF.SetStrokeColor
----------------------

The function sets the current stroke color as an list of values.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DynaPDF](component_DynaPDF.md) | [3.1](newinversion31.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "DynaPDF.SetStrokeColor"; PDF; Value... ) 

**MBS**( **"DynaPDF.SetStrokeColor";** /\* The function sets the current stroke color as an list of values. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Value...**) /\* The values for the colors.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |
| Value... | The values for the colors. | 0 |

### Result

Returns OK or error message.

### Description

The function sets the current stroke color as an list of values.   
The components of non-Lab color spaces must be in the range from 0 through 1. The \*a and \*b components of a Lab color space are typically in a range from -128 though 127. The \*L component ranges from 0 through 100.  
The number of components must match the number of components of the underlying color space.  
  
See also [DynaPDF.SetFillColor](DynaPDFSetFillColor.md).  
  
This function takes variable number of parameters. Pass as much parameters as needed separated by the semicolon in FileMaker.  
Please repeat Value parameter as often as you need.  
See also [SetStrokeColor](https://www.monkeybreadsoftware.com/DynaPDF-Manual/SetStrokeColor.shtml) function in DynaPDF manual.

### Examples

Sets color to red:

 MBS ( "DynaPDF.SetStrokeColor"; $PDF ; 1.0 ; 0.0 ; 0.0 )  
Sets color to blue:

 MBS ( "DynaPDF.SetStrokeColor"; $PDF ; 0.0 ; 0.0 ; 1.0 )  
Draw two lines in black:

 Set Variable \[$r ; Value:MBS ( "DynaPDF.SetStrokeColor" ; $pdf ; 0; 0; 0 )\]  
Set Variable \[$r ; Value:MBS ( "[DynaPDF.SetLineWidth](DynaPDFSetLineWidth.md)" ; $pdf ; 1 )\]  
Set Variable \[$r ; Value:MBS ( "[DynaPDF.MoveTo](DynaPDFMoveTo.md)" ; $pdf ; 20; 20)\]  
Set Variable \[$r ; Value:MBS ( "[DynaPDF.LineTo](DynaPDFLineTo.md)" ; $pdf ; 20; 40)\]  
Set Variable \[$r ; Value:MBS ( "[DynaPDF.MoveTo](DynaPDFMoveTo.md)" ; $pdf ; 30; 30)\]  
Set Variable \[$r ; Value:MBS ( "[DynaPDF.LineTo](DynaPDFLineTo.md)" ; $pdf ; 30; 50)\]  
Set Variable \[$r ; Value:MBS ( "[DynaPDF.StrokePath](DynaPDFStrokePath.md)" ; $pdf )\]  
Set color with integer values in range of 0 to 255:

 MBS ( "DynaPDF.SetStrokeColor"; $PDF ; $red / 255.0 ; $green / 255.0 ; /blue / 255.0 )  
### See also

- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.Rectangle](DynaPDFRectangle.md)
- [DynaPDF.RotateTemplate](DynaPDFRotateTemplate.md)
- [DynaPDF.RoundRectEx](DynaPDFRoundRectEx.md)
- [DynaPDF.SetFieldColor](DynaPDFSetFieldColor.md)
- [DynaPDF.SetLineWidth](DynaPDFSetLineWidth.md)
- [DynaPDF.SetStrokeColorValue](DynaPDFSetStrokeColorValue.md)
- [DynaPDF.StrokePath](DynaPDFStrokePath.md)
- [DynaPDF.WriteDemoText](DynaPDFWriteDemoText.md)
- [DynaPDF.WriteFTextEx](DynaPDFWriteFTextEx.md)

### Release notes

- **Version 11.0**
    - Added [DynaPDF.SetFillColorValue](https://www.mbsplugins.eu/DynaPDFSetFillColorValue.shtml) and [DynaPDF.SetStrokeColorValue](https://www.mbsplugins.eu/DynaPDFSetStrokeColorValue.shtml) functions.

### Example Databases

- [DynaPDF/Add Page Links](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Add%20Page%20Links.shtml#2ScriptAnchor_)
- [DynaPDF/Add Weblinks](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Add%20Weblinks.shtml#3ScriptAnchor_)
- [DynaPDF/Convert to 2 Pages](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Convert%20to%202%20Pages.shtml#4ScriptAnchor_)
- [DynaPDF/Coordinates](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Coordinates.shtml#1ScriptAnchor_)
- [DynaPDF/Create PDF with Bezier Curves](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Create%20PDF%20with%20Bezier%20Curves.shtml#1ScriptAnchor_)
- [DynaPDF/Create Text as PDFA](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Create%20Text%20as%20PDFA.shtml#7ScriptAnchor_)
- [DynaPDF/Place Picture](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Place%20Picture.shtml#1ScriptAnchor_)
- [DynaPDF/Shrink PDF pages](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Shrink%20PDF%20pages.shtml#2ScriptAnchor_)
- [DynaPDF/Watermark pages](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Watermark%20pages.shtml#2ScriptAnchor_)

### Blog Entries

- [Draw images with text using DynaPDF](https://www.mbsplugins.de/archive/2026-01-03/Draw_images_with_text_using_Dy/monkeybreadsoftware_blog_filemaker)
- [Add page links for FileMaker](https://www.mbsplugins.de/archive/2022-06-18/Add_page_links_for_FileMaker/monkeybreadsoftware_blog_filemaker)
- [Things you can do with DynaPDF](https://www.mbsplugins.de/archive/2021-07-02/Things_you_can_do_with_DynaPDF/monkeybreadsoftware_blog_filemaker)
- [Adding cutting lines for PDF in FileMaker](https://www.mbsplugins.de/archive/2021-01-04/Adding_cutting_lines_for_PDF_i/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 5/2021, Seite 26](https://filemaker-magazin.de/neuigkeit/4158-Appetithappen-FMM_202105)

This function checks for a license.

Created 18th August 2014 , last changed 5th June 2021

  
[DynaPDF.SetSpaceWidthFactor](DynaPDFSetSpaceWidthFactor.md) - [DynaPDF.SetStrokeColorValue](DynaPDFSetStrokeColorValue.md)

[HTML Version](DynaPDFSetStrokeColor.shtml)