PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Sep 26, 2020 5:35 pm

All times are UTC

Forum rules

Please read this before posting on this forum: Forum Rules

Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Convert RGB PDF to CMYK
PostPosted: Fri Jan 03, 2020 3:37 pm 

Joined: Fri Jan 03, 2020 3:19 pm
Posts: 1

I would like to know if there is a possibility to convert a PDF that is RGB into one with CMYK using PDFSharp in C#.
I'm already using PDFSharp for setting trim margins and the above mentioned functionality would save alot of time.

I've already tried something like this, but the new PDF is still in RGB

PdfDocument pdftest = PdfReader.Open(filename, PdfDocumentOpenMode.Import);
pdftest.Options.ColorMode = PdfColorMode.Cmyk;
PdfDocument oPDFNew = new PdfDocument();
PdfPage page1 = pdftest.Pages[0];
oPDFNew.Options.ColorMode = PdfColorMode.Cmyk;

Thanks for your help

Reply with quote  
PostPosted: Sat Jan 04, 2020 1:13 pm 
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 569
Location: CCAA
kernig wrote:
pdftest.Options.ColorMode = PdfColorMode.Cmyk;
This applies to new content you add to pages using XGraphics objects.

PDFsharp does not convert existing pages to the other format.

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

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

All times are UTC

Who is online

Users browsing this forum: No registered users and 22 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