exec and exec_shell in php

If you are using blanks in filenames or any other special character then you need to use escapeshellarg.

https://stackoverflow.com/questions/43513228/php-shell-exec-failed-due-to-some-specific-character

Also, exec and exec_shell are returning status and string of the last command executed (read docs) but it’s somewhat hard to understand when it’s true or false. I didn’t manage to use === operator to check logical expressions returned from the ran command.

https://stackoverflow.com/questions/41212053/php-shell-exec-and-exec-returning-false-when-ran

Also,for pdf merging use:

https://stackoverflow.com/questions/2507766/merge-convert-multiple-pdf-files-into-one-pdf