Hi,
I'm creating a shape defined as a Spot Color (as in your example).
I want the alternate color space to be RGB rather than CMYK as the result I get.
Is there a way to do so?
Thanks
Avinoam
PdfDocument pdf = new PdfDocument();
PdfPageBase page = pdf.Pages.Add();
PdfRGBColor c = Color.Purple;
//color space RGB
PdfSeparationColorSpace cs = new PdfSeparationColorSpace("MySpotColor", new PdfRGBColor(c.R, c.G, c.B));
//color space CMYK
PdfSeparationColorSpace cs = new PdfSeparationColorSpace("MySpotColor", new PdfRGBColor(c.C, c.M, c.Y, c.K));
//color space Grayscale
PdfSeparationColorSpace cs = new PdfSeparationColorSpace("MySpotColor", new PdfRGBColor(c.Gray));
PdfSeparationColor color = new PdfSeparationColor(cs, 1f);
PdfSolidBrush brush = new PdfSolidBrush(color);
page.Canvas.DrawPie(brush, 10, 30, 60, 60, 360, 360);
page.Canvas.DrawString("Tint=1.0", new PdfFont(PdfFontFamily.Helvetica, 10f), brush, new PointF(22, 100));
color = new PdfSeparationColor(cs, 0.5f);
brush = new PdfSolidBrush(color);
page.Canvas.DrawPie(brush, 80, 30, 60, 60, 360, 360);
page.Canvas.DrawString("Tint=0.5", new PdfFont(PdfFontFamily.Helvetica, 10f), brush, new PointF(92, 100));
color = new PdfSeparationColor(cs, 0.25f);
brush = new PdfSolidBrush(color);
page.Canvas.DrawPie(brush, 150, 30, 60, 60, 360, 360);
page.Canvas.DrawString("Tint=0.25", new PdfFont(PdfFontFamily.Helvetica, 10f), brush, new PointF(162, 100));
pdf.SaveToFile("SpotColorrgb.pdf");