Problems with GhostScript and nconvert
Moderators: XnTriq, helmut, xnview
- khaledhawari
- Posts: 11
- Joined: Tue Mar 06, 2012 8:41 am
Re: Problems with GhostScript and nconvert
Hey Pierre,
this is the output i got :
C:\Users\Administrator>nconvert -use_cie -org_depth -dpi 72 -q 100 -thumb 800 800 -overwrite -out jpeg -in pdf -o "C:/aya13.jpeg" "C:/aya13.pdf"
GSCheck C:\general\gs\gs9.05\bin\gsdll32.dll C:\general\gs\gs9.05\bin
Error: Don't know how to read this picture (C:/aya13.pdf)
this is the output i got :
C:\Users\Administrator>nconvert -use_cie -org_depth -dpi 72 -q 100 -thumb 800 800 -overwrite -out jpeg -in pdf -o "C:/aya13.jpeg" "C:/aya13.pdf"
GSCheck C:\general\gs\gs9.05\bin\gsdll32.dll C:\general\gs\gs9.05\bin
Error: Don't know how to read this picture (C:/aya13.pdf)
Re: Problems with GhostScript and nconvert
And the path is good?khaledhawari wrote: GSCheck C:\general\gs\gs9.05\bin\gsdll32.dll C:\general\gs\gs9.05\bin
Pierre.
- khaledhawari
- Posts: 11
- Joined: Tue Mar 06, 2012 8:41 am
Re: Problems with GhostScript and nconvert
yes the path is correct. i have installed in that path...
if i type "gswin32c" in command line, ghostscript is called normally.
what i have found is that when i open a php file from my browser like the following :
the jpeg is created normally, yet when i take the exact same command
i get the error! this is what is confusing me, why is it that when i call the php file i can convert yet when i run as command line i cannot.
if it helps, i have configured my server to run PHP as a module of Apache....
if i type "gswin32c" in command line, ghostscript is called normally.
what i have found is that when i open a php file from my browser like the following :
Code: Select all
<?php
echo "starting...";
exec('nconvert -use_cie -org_depth -dpi 72 -q 100 -thumb 800 800 -overwrite -out jpeg -in pdf -o "C:/aya13.jpeg" "C:/aya13.pdf"' , $out , $res);
echo $res;
echo "finished";
sleep(100);
?>
the jpeg is created normally, yet when i take the exact same command
Code: Select all
nconvert -use_cie -org_depth -dpi 72 -q 100 -thumb 800 800 -overwrite -out jpeg -in pdf -o "C:/aya13.jpeg" "C:/aya13.pdf"
if it helps, i have configured my server to run PHP as a module of Apache....
- khaledhawari
- Posts: 11
- Joined: Tue Mar 06, 2012 8:41 am
Re: Problems with GhostScript and nconvert
i run it from command prompt :
in my case i require it to run from the command line because my application has batch scripts that run and generate thumbs.
Code: Select all
C:\Users\Administrator>nconvert output.jpg input.jpg
Re: Problems with GhostScript and nconvert
Sorry but i don't understand. If you run nconvert as command line, it works. And if you start it by exec in php it doesn't work, right?
Pierre.
- khaledhawari
- Posts: 11
- Joined: Tue Mar 06, 2012 8:41 am
Re: Problems with GhostScript and nconvert
no it is the other way around, from php it works, from command line it doesnt.
I know i am causing you headache but this is really frustrating for me !
I know i am causing you headache but this is really frustrating for me !
Re: Problems with GhostScript and nconvert
With debug version of nconvert, do you have same output in the 2 cases?
Pierre.
- khaledhawari
- Posts: 11
- Joined: Tue Mar 06, 2012 8:41 am
Re: Problems with GhostScript and nconvert
alright i think its resolved!!
it was a privilege issue from command line ! i run my scripts as services , so i had to give them full administrator privilege from the services > log in as administrator, then restarted my machine and its resolved!
i will now revert back to the old versions and confirm if this was the case.
Thank you so so much for all your assistance.
it was a privilege issue from command line ! i run my scripts as services , so i had to give them full administrator privilege from the services > log in as administrator, then restarted my machine and its resolved!
i will now revert back to the old versions and confirm if this was the case.
Thank you so so much for all your assistance.