Page 1 of 2
Problems with GhostScript and nconvert
Posted: Mon Oct 11, 2010 6:00 pm
by goulding
I have GhostScript 8.53 installed. When I open the
PDF-Sample.pdf file in XnView it opens fine, but when I try to convert the same file using NConvert, I receive the following error:
Code: Select all
** NCONVERT v5.75 (c) 1991-2010 Pierre-E Gougelet (Sep 7 2010/11:49:02) **
Version for Windows Xp/Vista/7 x64 (All rights reserved)
** This is a freeware software (for non commercial use)
Error: Don't know how to read this picture (C:\CmdApps\_tests\PDF-Sample.pdf)
Conversion of C:\CmdApps\_tests\PDF-Sample.pdf into test.jpg OK
I have tried setting the windows environment "System Variables" XNVIEW_GS_DLL to point to my "gsdll32.dll" file and XNVIEW_GS_LIB to "gsdll32.lib" but I still receive the same error.
Any assistance would be appreciated,
Thanks,
Ken
Re: Problems with GhostScript and nconvert
Posted: Wed Oct 13, 2010 6:56 am
by xnview
I have gs 8.71, and no prolem with NConvert.
Could you try to update gs?
Re: Problems with GhostScript and nconvert
Posted: Wed Oct 13, 2010 9:10 pm
by goulding
Hi Pierre,
Unfortunately it may not be that easy to upgrade GhostScript for all deployment computers.
Can you think why XnView would recognize it and be able to use it when NConvert does not?
Thanks,
Ken
Re: Problems with GhostScript and nconvert
Posted: Wed Oct 13, 2010 9:17 pm
by goulding
FYI, here's the command I'm using:
Code: Select all
nconvert -xall -out jpeg -o test.jpg "C:\CmdApps\_tests\PDF-Sample.pdf" >out.txt 2>>err.txt
Re: Problems with GhostScript and nconvert
Posted: Thu Oct 14, 2010 1:45 pm
by xnview
goulding wrote:
Can you think why XnView would recognize it and be able to use it when NConvert does not?
You use XnView 1.97.8?
Re: Problems with GhostScript and nconvert
Posted: Thu Oct 14, 2010 2:05 pm
by goulding
Yes, 1.97.8
Re: Problems with GhostScript and nconvert
Posted: Thu Oct 14, 2010 2:47 pm
by goulding
I just tried installing gs 8.71 (I think I can just reference the dll and the lib file without affecting other applications that use GhostScript).
However that didn't change anything. I'm still getting the same error message.
I'm using the windows environment "System Variables" XNVIEW_GS_DLL to point to my "gsdll32.dll" file and XNVIEW_GS_LIB to "gsdll32.lib" in the gs8.71 bin folder.
FYI the older version of NConvert (version 5.00) works fine even if I delete the system variables (presumably its still using the older GS).
Older version:
** NCONVERT v5.00 (c) 1991-2008 Pierre-E Gougelet (Jul 21 2008/09:23:24) **
Version for Windows NT/9x/2000/Xp/Vista (All rights reserved)
Current version:
** NCONVERT v5.75 (c) 1991-2010 Pierre-E Gougelet (Sep 7 2010/11:49:02) **
Version for Windows Xp/Vista/7 x64 (All rights reserved)
Re: Problems with GhostScript and nconvert
Posted: Thu Oct 14, 2010 3:04 pm
by goulding
I just tried another test using the 32 bit version of NConvert 5.75. That also works, so I think we can safely say its a 64 bit issue.
Re: Problems with GhostScript and nconvert
Posted: Fri Oct 15, 2010 9:11 am
by xnview
Ok, if you use NConvert x64, you should have GS x64 too!
Re: Problems with GhostScript and nconvert
Posted: Tue Mar 06, 2012 9:03 am
by khaledhawari
Hello,
i have the following environment :
- Windows server 2008 R2 (64-bit version) installed on a VM
- Ghostscript 8.71 (32-bit)
- Nconvert 5.62 (32-bit)
- both nconvert and gs are defined in environment variables
i am trying to convert PDF to JPEG using any of the following commands :
- nconvert -use_cie -org_depth -dpi 72 -q 100 -thumb 800 800 -overwrite -out jpeg -in pdf -o
- nconvert -use_cie -org_depth -page 0 -q 50 -dpi 72 -resize 100% 100% -out jpeg -o
- nconvert -use_cie -org_depth -out jpeg -o
all leading to the same error:
C:\Users\Administrator>nconvert -use_cie -org_depth -dpi 72 -q 100 -thumb 800 80
0 -overwrite -out jpeg -in pdf -o C:\Users\Administrator\Desktop\30821.jpeg C:\U
sers\Administrator\Desktop\30821.pdf
** NCONVERT v5.62 (c) 1991-2010 Pierre-E Gougelet (Apr 22 2010/17:32:06) **
Version for Windows NT/9x/2000/Xp/Vista (All rights reserved)
** This is a freeware software (for non commercial use)
Error: Don't know how to read this picture (C:\Users\Administrator\Desktop\308
21.pdf)
As i have read, this error appears when Nconvert is not able to find GS, but i am able to call both applications from command line. so i removed both applications and installed the 64-bit versions of each but to no avail, i kept on having the same error.
i then tired the 32 and 64-bit versions of Nconvert 6.01 and still same result
The weird part is , my PHP application calls nconvert using the exec function to convert PDF to jpeg, and when i upload a PDF via my application it is able to convert to JPEG!
Yet when i run the exact same command from command line, i receive the above error!
i tried the command line on a physical windows server 2008 with the same setup and it works fine!!
Any help on how to tackle this issue would be greatly appreciated ! thanks in advance
Re: Problems with GhostScript and nconvert
Posted: Tue Mar 06, 2012 1:43 pm
by xnview
Do you have tried last version of NConvert & ghostscript?
Re: Problems with GhostScript and nconvert
Posted: Tue Mar 06, 2012 4:30 pm
by khaledhawari
Hey Pierre,
I have tried the latest versions :
- ghostscript 9.02 32-bit
- nconvert 6.05 32-bit
and still same problem
Re: Problems with GhostScript and nconvert
Posted: Tue Mar 06, 2012 5:19 pm
by xnview
Houps, i have not seen that
The weird part is , my PHP application calls nconvert using the exec function to convert PDF to jpeg, and when i upload a PDF via my application it is able to convert to JPEG!
Yet when i run the exact same command from command line, i receive the above error!
i tried the command line on a physical windows server 2008 with the same setup and it works fine!!
nconvert use registry to find gs, so if you launch it with command line or php, it's the same for me...
For a jpeg file, no problem?
Re: Problems with GhostScript and nconvert
Posted: Wed Mar 07, 2012 8:54 am
by khaledhawari
hey Pierre,
I was able to convert JPG to PNG normally from command line...
is there a way i can track how nconvert is looking for gs in registry ? can i provide you with my registry keys or anything to help ?
Re: Problems with GhostScript and nconvert
Posted: Wed Mar 07, 2012 9:59 am
by xnview
I can send you a version with output debug information? Send me your email by PM