allow PDFFormatter to return bytes
Merge pull request #6615 from minrk/pdf-bytes

allow PDFFormatter to return bytes