allow PDFFormatter to return bytes

closes #5791