PDFsharp & MigraDoc Foundation https://forum.pdfsharp.net/ |
|
limit to the number of font colours available? https://forum.pdfsharp.net/viewtopic.php?f=2&t=2775 |
Page 1 of 1 |
Author: | nitsuj [ Thu Mar 27, 2014 3:02 pm ] | ||
Post subject: | limit to the number of font colours available? | ||
I'm trying to set the colour of a paragraph to a specific colour, but the produced PDF is a lot darker. In the attachment the "ran" is the darker colour being produced and the "Are Ba" is the colour I want. I have tired: Code: //style.Font.Color = Color.FromCmyk(1,0,0.545,0.310);// - is white / transparent //style.Font.Color = Color.Parse("0x00B050");//too dark style.Font.Color = new Color(0, 176, 80);//too dark and both produce the same darker colour. Is there a limit to the colors that can be used?
|
Author: | Thomas Hoevel [ Thu Mar 27, 2014 3:21 pm ] |
Post subject: | Re: limit to the number of font colours available? |
Hi! You specify "(0, 176, 80)", PDFsharp writes "(0, 176, 80)" into the PDF file. Color profiles may be accountable for the visual difference, but that is not my area of experience. BTW: Try Color.FromCmyk(100,0,54.5,31) instead (value range 0 through 100). BTW2: Are you creating a CMYK PDF file? I tried the color "(0, 176, 80)" in an RGB PDF and I got the bright green (left part of image). |
Author: | nitsuj [ Thu Mar 27, 2014 7:02 pm ] |
Post subject: | Re: limit to the number of font colours available? |
fantastic, I had document.UseCmykColor = true right at the top of my code. Removed it and all is good with the world again |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |