I'd gladly accept a PEP8 pull request for this file (though I think for clarity, it should be done separately).  The vast majority of our tests output PDF files, so `backend_pdf.py` is actually one of the better tested modules in the system.