When you chain unix commands like sort data.txt | less effectively the stdout of one command "becomes" the stdin of another command. You can do kinda same with php when calling another process. But in your case you want the data from stdout of one process and send it to php's stdout (sending it to the client).
The simplest way is to use passthru()
header('Content-type: application/pdf');
passthru('yourcommand -o -');
But since you have to set the application/pdf header before the commands sends any output the error handling might be tricky. The client expects a PDF document and if you send something else, e.g. a plain text error message, the result will be ...confusing.
Still, you can fetch the data from your command's stdout but without php automagically glueing the stdout to php's stdout. see popen() and/or proc_open(). You'll get a handle you can read from (almost like a file handle) and get the output the application made to stdout (with proc_open you also get the stderr stream) without any physical file laying around.