pdftotext man page:
If text-file is ´-', the text is sent to stdout.
So in this case all you need is:
pdftotext "C BY BRIAN W KERNIGHAN & DENNIS M RITCHIE.pdf" -
Or if you want to pipe this to STDIN of another program:
pdftotext "C BY BRIAN W KERNIGHAN & DENNIS M RITCHIE.pdf" - | another_prog
- as substitute for a filename is a convention many utilities follow (including pdftotext) when we want input from STDIN or output to STDOUT. However not all utilities follow this convention. In that case the idiomatic way to do this in bash is to use a process substitution:
my_utility "C BY BRIAN W KERNIGHAN & DENNIS M RITCHIE.pdf" >( cat )
>( ) behaves largely like a file passed to
my_utility, but instead of being a real file, the stream is piped into the stdin of the contained process, i.e. cat. So here, the text should ultimately output as required.
cat almost always sets off UUOC alarm bells on forums like this. I contend that if the utility does not support
-, then this is a useful use of
cat, though if there are any ways to do this process substitution without the
cat, then I'm all ears ;-).
However, if (as the question states) the ultimate destination of of the stream is STDIN of another program, then the
cat can be eliminated:
my_utility "C BY BRIAN W KERNIGHAN & DENNIS M RITCHIE.pdf" >( another_prog )