PDF to JPG Loses Color

Discussions about PDF management.
Post Reply
TuckMan
Posts: 1
Joined: Mon Feb 09, 2015 11:50 pm

PDF to JPG Loses Color

Post by TuckMan » Tue Feb 10, 2015 12:13 am

Please advise - We have been using gdPicturePro5 for a long time and have never had any issues until now as stated below. This was written in VFP but if there is a solution to this issue in a later .net version we can go that route too.

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: Image
Bad JPG exported by gdPicture: Image

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)

Gabriela
Posts: 422
Joined: Wed Nov 22, 2017 9:52 am

Re: PDF to JPG Loses Color

Post by Gabriela » Mon May 06, 2019 11:42 am

Hello,

Are you still interested in this feature or are you still experience such issues with GdPicture14? The toolkit now contains many improved and optimized new features. If you can replicate your issues with the current release (https://www.gdpicture.com/download-gdpicture/), please send us again the current code snippet, the original document (it is not more available), so we can assist you further.
Thank you.
Kind regards,

Gabriela
GdPicture Team

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest