PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Colors not properly shown
https://forum.pdfsharp.net/viewtopic.php?f=2&t=4240
Page 1 of 1

Author:  usergn [ Thu Feb 25, 2021 4:36 pm ]
Post subject:  Colors not properly shown

Hi,
I'm working with MigraDoc for the creation of new PDFs.
What I found out is that colors are not properly shown in my PDFs.
I'm working with the class MigraDoc.DocumentObjectModel.Color in C#.
What I found out is that Color.Parse() using hex does not give the exact color. Even using new Color(byte, byte, byte) with RGB values does not change the result.
Do I miss something?

Author:  TH-Soft [ Thu Feb 25, 2021 5:31 pm ]
Post subject:  Re: Colors not properly shown

Hi!
usergn wrote:
Do I miss something?
You missed providing some sample code. Would be good to show the C# source code and the MDDDL of the generated document.
Would be good to describe or show what you expect and what you get instead.
http://forum.pdfsharp.net/viewtopic.php?f=2&t=832

Author:  usergn [ Fri Feb 26, 2021 8:22 am ]
Post subject:  Re: Colors not properly shown

Hi, thanks for the reply. I found out the problem was related to UseCmykColor = true, which seemed to change the color tones.

Author:  TH-Soft [ Fri Feb 26, 2021 8:26 am ]
Post subject:  Re: Colors not properly shown

usergn wrote:
I found out the problem was related to UseCmykColor = true, which seemed to change the color tones.
The RGB colours are converted to CMYK and stored in the PDF as CMYK. Using the CMYK methods of the Color class allows you to avoid conversion in CMYK mode.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/