Пример #1
0
        public PdfSpecialCs GetSeparationColorspace(PdfWriter writer, DeviceCmyk cmyk)
        {
            PdfDictionary pdfDictionary = new PdfDictionary();

            pdfDictionary.Put(PdfName.FunctionType, new PdfNumber(2));
            pdfDictionary.Put(PdfName.Domain, new PdfArray(new float[] { 0, 1 }));
            pdfDictionary.Put(PdfName.C0, new PdfArray(new float[] { 0, 0, 0, 0 }));
            pdfDictionary.Put(PdfName.C1, new PdfArray(cmyk.GetColorValue()));
            pdfDictionary.Put(PdfName.N, new PdfNumber(1));

            PdfFunction pdfFunction = new PdfFunction.Type2(pdfDictionary);

            return(new PdfSpecialCs.Separation("mySpotColor", cmyk.GetColorSpace(), pdfFunction));
        }
 public virtual iText.Kernel.Pdf.Annot.DA.AnnotationDefaultAppearance SetColor(DeviceCmyk cmykColor)
 {
     SetColorOperand(cmykColor.GetColorValue(), "k");
     return(this);
 }