view.py pdf method to file pdf.py