[reportlab-users] Custom Flowables - Can't get shapes.Drawing() to paint to the story/canvas
Robin Becker
robin at reportlab.com
Fri Nov 30 05:45:44 EST 2012
On 30/11/2012 04:30, J. R. Carroll wrote:
> Well, the issue of making a flowable from Drawing never came to fruition,
> but I'll tackle it later. Until then I wrestled the script into submission.
>
> It's freely available to anyone who might make use of it - the script.zip
> also has a sample PDF of what it generates. If new colors are added or you
> want to create a new PDF you can just rerun the script itself; I'm sure
> others have created similar solutions, or this was an odd way of
> approaching the problem of the printer/pdf grid lines, but it was a really
> fun side-project that allowed me to learn some additional ReportLab
> features!
>
> But our company will be using this PDF/script to look/debug printers in the
> future. Our intent is to look at the grayscale, color, and on-the-screen
> PDF to decide which colors will work for our purposes.
>
> I'll respond to my other thread, so at least it gets documented - this
> is regarding the printing issue with the strip chart (where it was printing
> some grid lines and not others) as I have my final conclusions on the
> entire mess.
>
> If anyone has solutions on how to optimize it I'm all ears - I'm new to
> reportlab so I'd love to hear some feedback.
>
> You can download the script from here:
> http://www.jrcresearch.net/downloads/scripts.zip
>
> Thanks again for your help Tim!
>
> -J
>
Drawings are in fact flowables by default ie
class Drawing(Group, Flowable):
......
so you should be able to create a Drawing, add it to a story and then get the
story to build as in the normal page flow case.
--
Robin Becker
More information about the reportlab-users
mailing list