Wrong colors in Overprint mode

Product: c# pdfnet.dll

Product Version: V6.71595

Please give a brief summary of your issue:
When viewing pdf in overprint mode colors are wrong (darkened)

Please describe your issue and provide steps to reproduce it:
View this pdf in adobe reader and set Use Overprint Always and color 251 , 68 , 241 will be wrong:

    public void TestColor()

        string outputFile = "./color.pdf";
        using (var output = new FileStream(outputFile, FileMode.Create, FileAccess.Write))
        using (PDFDoc doc = new PDFDoc())
        using (ElementBuilder eb = new ElementBuilder())
        using (ElementWriter writer = new ElementWriter())
            var page = doc.PageCreate();

            var rect = eb.CreateRect(0, 0, 500, 500);

            rect.GetGState().SetFillColor(new ColorPt(251 / 255.0, 68 / 255.0, 241 / 255.0));


            doc.Save(output, SaveOptions);

Tee same problem with colors in overprint appears if I add image to the page or pdf.

How to fill with colors or add image so the color won’t change in overprint mode?

Please provide a link to a minimal sample where the issue is reproducible:

PDFNet 6.7 is from 2016, and your SDK is most likely at least 6 years old.

Please try again with PDFNet 9.4.2


I’ve just tried with V9.42807 -same result. For example color RGB 251 , 68 , 241 turns into 196 97 165 in Overprint view.

Hello Ivan;

After a bit more testing it appears this is a natural consequence of Overprint Mode in Adobe Reader, as I have seen the same behavior in PDF files created via Microsoft’s Print to PDF option. The attached PDF was created in Paint.NET from a solid fill at RGB 251,68,241 (CMYK 0,73,4,2), and when the document is displayed in Overprint View it is similarly darkened.
PdN_DIR.pdf (11.5 KB)

This is likely intentional on Adobe’s part to better represent how those colors would actually Print to a Physical Printer. Could you tell us why specifically you are looking to avoid this issue or what your specific Use Case is?

Best Regards;