Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Tue Feb 16, 2021 10:30 am

Hi,

Is it possible to specify an ICC color profile for a PDF.

I would like the resulting PDF to be CMYK using the Fogra 39 ICC profle.

Thanks

emaginationstore
 
Posts: 15
Joined: Mon Sep 25, 2017 2:02 pm

Tue Feb 16, 2021 12:49 pm

Hello,

Thanks for your message.
To help us investigate your requirement more accurately, could you please provide you desired output effect document for reference? Thanks in advance.

Sincerely,
Sofia
E-iceblue support team
User avatar

Sofia.Yang
 
Posts: 84
Joined: Tue Jul 14, 2020 1:41 am

Tue Jun 01, 2021 10:18 am

Sorry I have only just seen your reply.

I have a attached a simple document with the ICC profile embedded.

Thank you

emaginationstore
 
Posts: 15
Joined: Mon Sep 25, 2017 2:02 pm

Wed Jun 02, 2021 11:34 am

Hello,

Thank you for sharing more information.
Our Spire.PDF provides the following method to draw rectangle with CMYK, but the color space is "DeviceCMYK" rather than the "ICCBased DeviceCMYK" used in your PDF, sorry to tell our product doesn't support the "ICCBased DeviceCMYK" color space at present. I have posted this requirement to our Dev team to investigate whether it can be achieved in the future. If there is any progress, we will let you know.
Code: Select all
PdfDocument pdf = new PdfDocument();
//Create one page
PdfPageBase page = pdf.Pages.Add();
int x = 200;
int y = 300;
int width = 200;
int height = 120;
pdf.ColorSpace = PdfColorSpace.CMYK;
PdfSolidBrush brush = new PdfSolidBrush(new PdfRGBColor(1f, 0, 0, 0));
PdfSolidBrush brush2 = new PdfSolidBrush(new PdfRGBColor(0, 0, 0, 1f));
//Draw a filled rectangle
page.Canvas.DrawRectangle(new PdfPen(brush2), brush, new Rectangle(new Point(x, y), new Size(width, height)));
pdf.SaveToFile("result.pdf", FileFormat.PDF);


Sincerely,
Sofia
E-iceblue support team
User avatar

Sofia.Yang
 
Posts: 84
Joined: Tue Jul 14, 2020 1:41 am

Return to Spire.PDF