[reportlab-users] Insert a chart in a pdf...
Dinu Gherman
reportlab-users@reportlab.com
Wed, 17 Jul 2002 20:14:46 +0200 (CEST)
Marcus Vinicius Laranjeira <m.laranjeira@datacraft.com.br>:
> Is there a way to insert the drawing directly on the frame flowable
> instead
> of creating a file and then inserting this file in the frame !?
Here's a snippet from tools/docco/graphdocpy.py:
def _showWidgetDemo(self, widget):
"""Show a graphical demo of the widget."""
# Get a demo drawing from the widget and add it to the story.
# Ignored if no GD rendering available
# or the demo method does not return a drawing.
try:
if VERIFY:
widget.verify()
drawing = widget.demo()
flo = renderPDF.GraphicsFlowable(drawing)
self.story.append(Spacer(6,6))
self.story.append(flo)
self.story.append(Spacer(6,6))
except:
if VERBOSE:
print 'caught exception in _showWidgetDemo'
traceback.print_exc()
else:
pass
Regards,
Dinu