Ticket #12369: outputting-pdf.diff
File outputting-pdf.diff, 692 bytes (added by , 14 years ago) |
---|
-
docs/howto/outputting-pdf.txt
101 101 library provides a file-like object interface that is particularly efficient. 102 102 Here's the above "Hello World" example rewritten to use ``cStringIO``:: 103 103 104 from cStringIO import StringIO 104 # Fallback to StringIO in environments where cStringIO is not available 105 try: 106 from cStringIO import StringIO 107 except ImportError: 108 from StringIO import StringIO 105 109 from reportlab.pdfgen import canvas 106 110 from django.http import HttpResponse 107 111