Draw On PDF With Spot Color
View as MarkdownFills a rectangle with a PANTONE color.
Code 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
DownloadVectorSpot.png
Used APIs
- Aurigma.GraphicsMill.Codecs.ImageWriter.Close
- Aurigma.GraphicsMill.Codecs.PdfWriter
- Aurigma.GraphicsMill.Codecs.PdfWriter.AddPage(Single,Single,Single,Single)
- Aurigma.GraphicsMill.Codecs.PdfWriter.GetGraphics
- Aurigma.GraphicsMill.Drawing.Graphics.FillRectangle(Brush,Single,Single,Single,Single)
- Aurigma.GraphicsMill.Drawing.SolidBrush
- Aurigma.GraphicsMill.Ink
- Aurigma.GraphicsMill.SpotColor