In converting certain PDF files to JPG, the JPG seems to be created a lot "brighter" than the original in the PDF. It seems to be trashed right at the DisplayFromPdfFile() method as seen in the sample application viewer, but see no parameters in opening the PDF correctly without losing colors.
Code is at the bottom of this post.
Please view the two JPG's side by side and you will see the bad image is brighter than the good image.
The original PDF is here in case you want to test yourself.
Original PDF: http://www.instantimpact.com/jpgproofs/ ... iginal.pdf
Good JPG exported manually
Bad JPG exported by gdPicture
Code: Select all
oPDF = CREATEOBJECT("gdpicturepro5.gdviewer")
oPDF.SetLicenseNumber("11111111111111111111111")
oPDF.LockControl = .T.
oPDF.PdfDpiRendering = 300
oPDF.DisplayFromPdfFile("C:\PDFs\artwork.pdf")
oImage = CREATEOBJECT("gdpicturepro5.imaging")
oImage.SetLicenseNumber("11111111111111111111111")
oImage.SetNativeImage(oImage.CreateClonedImage(oPDF.GetNativeImage))
oImage.SetVerticalResolution(300)
oImage.SetHorizontalResolution(300)
oImage.SaveAsJPEG("C:\JPGs\artwork.jpg", 100)