Try using
exec("<full path to binary> '-dNOPAUSE' '-sDEVICE=jpeg' '-r<resolution>' '-g<dimensions' '-dUseCIEColor' '-dTextAlphaBits=4' '-dGraphicsAlphaBits=4' '-o<where you want the image stored>' '-dJPEGQ=<quality - I used 90>' '<pdf file to resize>'", $outputArray);
If placeholders are populated using variables, variables like $resolution just go straight to the command, for example -r$resolution .
You can also find this site .
source share