2017-12-16 12 views
0

私はpdfファイルのレポートcodeを書きましたが、エラーに直面しました。pdf report generate python 2.7

はTypeError課金/ invioce_report /時/

のinit()は、正確に1引数(2与えられた)応答を書き、ダウンロード可能なファイルを作成する方法

を取りますか?

response = HttpResponse(content_type='"application/pdf"') 
     response['Content-Disposition'] = 'attachment; filename="users.pdf"' 
     **writer = pyPdf.PdfFileWriter(response)** 
     writer.writerow(
      ['Creation Date', 'Bill Number', 'Name', 'Product/Service Name', "Ref No", "Cost", "discounted Price","Net Amount", 
      "Costomer Name", "Commission Staff", "Commission Amount", "Patyment Type"]) 
+0

が質問を編集してくださいHTMLにあなたの内容を変換する必要があり、そのためにwkhtmltopdf(PDFキット)を使用することをお勧めしますPDFを作成したい場合は、コードの一部を持っています私たちはあなたを助けることができますか? – hansTheFranz

+0

@hansTheFranzは編集コードをチェックします –

答えて

0

あなたが、あなたが

+0

私はpdf形式でデータベース値を表示する必要があります –