diff --git a/docs/outputting_pdf.txt b/docs/outputting_pdf.txt index 003f4d6304..9f3d6b26eb 100644 --- a/docs/outputting_pdf.txt +++ b/docs/outputting_pdf.txt @@ -117,7 +117,7 @@ efficient. Here's the above "Hello World" example rewritten to use response = HttpResponse(mimetype='application/pdf') response['Content-Disposition'] = 'attachment; filename=somefilename.pdf' - buffer = String() + buffer = StringIO() # Create the PDF object, using the StringIO object as its "file." p = canvas.Canvas(buffer)