Page 2 of 2
Re: Problems with GhostScript and nconvert
Posted: Wed Mar 07, 2012 1:02 pm
by khaledhawari
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)
Re: Problems with GhostScript and nconvert
Posted: Wed Mar 07, 2012 1:54 pm
by xnview
khaledhawari wrote:
GSCheck C:\general\gs\gs9.05\bin\gsdll32.dll C:\general\gs\gs9.05\bin
And the path is good?
Re: Problems with GhostScript and nconvert
Posted: Wed Mar 07, 2012 2:13 pm
by khaledhawari
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 :
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"
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....
Re: Problems with GhostScript and nconvert
Posted: Wed Mar 07, 2012 2:42 pm
by xnview
how do you start nconvert? Not with exec?
Re: Problems with GhostScript and nconvert
Posted: Wed Mar 07, 2012 2:57 pm
by khaledhawari
i run it from command prompt :
Code: Select all
C:\Users\Administrator>nconvert output.jpg input.jpg
in my case i require it to run from the command line because my application has batch scripts that run and generate thumbs.
Re: Problems with GhostScript and nconvert
Posted: Wed Mar 07, 2012 3:02 pm
by xnview
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?
Re: Problems with GhostScript and nconvert
Posted: Wed Mar 07, 2012 3:12 pm
by khaledhawari
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 !
Re: Problems with GhostScript and nconvert
Posted: Wed Mar 07, 2012 3:18 pm
by xnview
With debug version of nconvert, do you have same output in the 2 cases?
Re: Problems with GhostScript and nconvert
Posted: Wed Mar 07, 2012 4:26 pm
by khaledhawari
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.