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)