Ticket #12369: outputting-pdf.diff

File outputting-pdf.diff, 692 bytes (added by niall, 14 years ago)
  • docs/howto/outputting-pdf.txt

     
    101101library provides a file-like object interface that is particularly efficient.
    102102Here's the above "Hello World" example rewritten to use ``cStringIO``::
    103103
    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
    105109    from reportlab.pdfgen import canvas
    106110    from django.http import HttpResponse
    107111
Back to Top