PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat May 15, 2021 6:25 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Thu Feb 25, 2021 4:36 pm 
Offline

Joined: Thu Feb 25, 2021 4:32 pm
Posts: 2
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?


Top
 Profile  
Reply with quote  
PostPosted: Thu Feb 25, 2021 5:31 pm 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 636
Location: CCAA
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

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 26, 2021 8:22 am 
Offline

Joined: Thu Feb 25, 2021 4:32 pm
Posts: 2
Hi, thanks for the reply. I found out the problem was related to UseCmykColor = true, which seemed to change the color tones.


Top
 Profile  
Reply with quote  
PostPosted: Fri Feb 26, 2021 8:26 am 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 636
Location: CCAA
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.

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group