[reportlab-users] renderPM can't change resolution

Matej Pivoluska reportlab-users@reportlab.com
Mon, 1 Dec 2003 21:30:08 +0100


Hello,

I want to render some custom plots for OpenOffice.org documents with reportlab. 
I written small PyQt application for simplify creation of these plots. 

And the problem is:

renderPM module seems to be broken when it has to render image in other
resolution than 72 dpi. I can set any resolution througt dpi parameter but it
the saved image size is always the same. And when I open the image in Gimp I
can see resolution 72 dpi in info dialog.

I use renderPM renderer to get bitmap output. It is fixed at 72 dpi. I tested
it with drawToString and drawToFile methods.


<snip>
        from reportlab.graphics import renderPM
        renderPM.drawToFile(drawing, 'wow.png', fmt='PNG', dpi = 300 )
<snip>
        img = renderPM.drawToString( drawing, fmt = 'BMP',  dpi = 300 )


mP