Dynapdf SetStrokeColor

With call pdf.SetStrokeColor 0 the colour is Black

Where can I find the values for the other colors ?

what colorspace do you have?

Normally you can use CMYK or RGB functions on DynaPDFMBS class.

I want to enter a gray line
Colorspace that signify?

The values you pass vary according to the Device Colorspace in use.
This can be DeviceGrey, DeviceRGB, or DeviceCMYK

You can set the colorspace up for a variety of actions using
SetColorSpace(), SetFillColorSpace(), and SetStrokeColorSpace().
Then call (for example) SetStrokeColor using the method that relates to the color space in effect.

In DeviceGrey, you can send a single value ranging from 0 to 255 , where 0 = full black

Assuming you begin in DeviceRGB…
In DeviceRGB, you send values for the brightness of the R,G,B compnonents
pdf.setStrokeColor(0.5,0.5,0.5) should do that in an RGB colorspace (values from 0 to 1)

And yes, as usual, the documentation on this is pretty hard to follow, so if I have misread it, I apologise .

I tried this and it works

call pdf.SetStrokeColor(pdf.RGB(0,148,28))

SetStrokeColor is overloaded Nd works for both integer value and floating point array.
So al ways are correct :slight_smile: