Unexpected input 62;9;c62;9;c62;9;c62;9;c appears in shell after writing buffers to stdout
PDF files are binary files. While they can contain text, they can and do contain non-textual data.
To solve this problem: don't dump binary data to your shell's output. It doesn't matter where the binary data comes from - try cat /usr/bin/bash
. You'll get the same result. The only way to prevent this from "messing up" your shell's output is to not do it.