[reportlab-users] pb with images

Jerome Alet alet at librelogiciel.com
Wed Dec 14 12:58:26 EST 2005


On Wed, Dec 14, 2005 at 09:53:52AM -0800, Tim Roberts wrote:
> On Wed, 14 Dec 2005 14:22:32 +0100, Jerome Alet <alet at librelogiciel.com> 
> wrote:
> 
> >...If I linearize the code using the pycanvas framework included
> >in ReportLab, I've got a 54 Mb python program (>41000 lines long)
> >which in fact does (for each image) :
> >
> >--- CUT ---        
> ># Saves context level 1 {'_mitreLimit': 0, '_leading': 14.4, 
> >'_textLineMatrix': (1.0, 0.0, 0.0, 1.0, 0.0, 0.0), '_fontsize': 12, 
> >'_horizScale': 100, '_fillMode': 0, '_lineJoin': 0, '_charSpace': 0, 
> >'_strokeColorRGB': (0, 0, 0), '_y': 0, '_x': 0, '_dynamicFont': 0, 
> >'_textMatrix': (1.0, 0.0, 0.0, 1.0, 0.0, 0.0), '_textRenderMode': 0, 
> >'_textMode': 0, '_lineCap': 0, '_lineDash': None, '_currentMatrix': (1.0, 
> >0.0, 0.0, 1.0, 42.519685039370074, 42.519685039370074), '_fontname': 
> >'Times-Roman', '_lineWidth': 0, '_fillColorRGB': (0, 0, 0), '_wordSpace': 
> >0, '_rise': 0}
> >c.saveState()
> >c.translate(219.40376884083801, 529.37537249388242)
> >
> 
> 
> I love computers.  Given that the matrix scale is in points, you are 
> specifying the translation there with an accuracy down to one 
> one-thousandth of the diameter of a proton.  I'm guessing that most of 
> today's laser printers don't place toner at the sub-atomic level.

You should give a look at reportlab/pdfgen/pycanvas.py and what it 
does. 

There's absolutely NO reason for it to do rounding.

bye,

Jerome Alet


More information about the reportlab-users mailing list