Draw On PDF With Spot Color

PDF Spot Color Write

Fills a rectangle with a PANTONE color.

Сode Snippet

using (var pdfWriter = new PdfWriter("VectorSpot.pdf"))
using (var gr = pdfWriter.GetGraphics())
{
    var ink = new Ink("PANTONE Red 032 C", new RgbColor(243, 40, 55));
    var spotColor = new SpotColor(ink, 255);

    pdfWriter.AddPage(500, 500, 72, 72);

    gr.FillRectangle(new SolidBrush(spotColor), 10, 10, 400, 400);

    pdfWriter.Close();
}

Output

VectorSpot.pdf

Download

VectorSpot.png

For AI-assisted development: Download Graphics Mill Code Samples XML Catalog