Is there a way to tell Spire PDF to draw a Image with defined spot colors?
I have a QR Barcode Image and I want it to be placed in the center of my PDF document and I want to tell the PDF that this Image is drawn with some defined spot colors. But I cant find a way to do this.
- Code: Select all
PdfImage imgQR = PdfImage.FromImage(MY_IMAGE_SOURCE);
page = pdfDocument.Pages[1];
float width = imgQR.Width * 0.75f;
float height = imgQR.Height * 0.75f;
float x = (page.Canvas.ClientSize.Width - width) / 2;
float y = (page.Canvas.ClientSize.Height - height) / 2;
page.Canvas.DrawImage(imgQR, x, y, width, height);
Here you can see my Image draw process. Everything is working but if you examine the pdf the Image is drawn with CMYK and not the defined spot colors. For me it is totaly clear why the Image is drawn in the CMYK Color space but it would be very very helpfull if someone knows a way to "convince" the Image to use the defined SpotColors (Of Course the Image uses only Colors which are defined as Spot Colors too).
Here you can see the relevant part of the Image creation, but this is another library just to show you the are using normal Colors to draw the Image.
- Code: Select all
QRCodeForegroundColor = Color.FromArgb(69, 84, 99),
QRCodeBackgroundColor = Color.FromName("White")
If you need any extra Information, just feel free to ask.
best regards
Bado