I had a problem while using PHP exec(). I am not able to figure out the issue and I have tried with following code:
exec("pdfcrop --margins '-6 -2 -3 -2' '/home/username/pdf/Figure 1 Timeline of Virtual Sim Use/page.01.pdf' '/home/username/pdf/out/output.pdf'", $output, $error);
Whenever I use this commands in exec() it returns status code of 2 but if I use this command to my terminal then it works well. So kindly give your suggestion to solve this problem.
thank you..
exec()doesn't return status codes, it returns the last line from the result of the command. Do you mean that$erroris 2? Do you mean PDFCrop?