Color diference when rendering PDF to JPEG

I have the code to render PDF to JPEG but the result image’ color is a bit different from the source PDF file.

Sample Code:

PDFNet.SetResourcesPath(“C:\profiles”)

PDFNet.SetColorManagement(pdftron.PDFNet.CMSType.e_lcms)

PDFNet.SetDefaultDeviceCMYKProfile(“USWebCoatedSWOP.icc”)
PDFNet.SetDefaultDeviceRGBProfile(“AdobeRGB1998.icc”)

Using doc As pdftron.PDF.PDFDoc = New pdftron.PDF.PDFDoc(“c:\sample.pdf”)
doc.InitSecurityHandler()
Dim PDFpage As pdftron.PDF.Page = doc.GetPage(1)
If PDFpage IsNot Nothing Then
Using draw As New pdftron.PDF.PDFDraw()

draw.SetDPI(300)
draw.SetAntiAliasing(True)
draw.SetImageSmoothing(True, True)
draw.Export(PDFpage, “c:\1.jpg”, “jpg”)

draw.Dispose()
End Using
End If
End Using

sample.pdf (166 KB)

Thank you for the report.

I checked against other viewers (i.e. Foxit, NitroPDF), and none render the same as Adobe’s.

We will look into making our rendering similar to Adobe’s, though I can’t give any time line.

The following has further advice: https://groups.google.com/d/msg/pdfnet-sdk/-lZ1c-yEsq8/sO3KKnv8sJgJ