[reportlab-users] Use a flowable on an ordinary canvas?

Dinu Gherman reportlab-users@reportlab.com
Mon, 12 Aug 2002 18:30:30 +0200


Am Montag den, 12. August 2002, um 17:58, schrieb Jeff Kowalczyk:

> I'm looking into the Barcode extension module, just to try it out and 
> see
> what I can do with it. All the barcode classes are flowables, however. 
> Is
> there anything I can do to just ask a canvas to render a flowable at an
> absolute coordinate? All my work is going to be nonflowable, so I 
> haven't
> worked with platypus yet (warned that it would have thread issues in 
> Zope
> anyway), so I'm operating under the KISS principle here. Thanks.

Sure you can use them on a PDF canvas! See the excerpt from the
Reference Manual below.

Regards,

Dinu


Class Flowable:
   Abstract base class for things to be drawn. Key concepts:
   1. It knows its size
   2. It draws in its own coordinate system (this requires the
   base API to provide a translate() function.

   def drawOn(self, canvas, x, y, _sW=0):
     Tell it to draw itself on the canvas. Do not override