RenderPM will only work on updated Reportlab,commented

bzr revid: jvo@tinyerp.com-20081014052037-mlswuotvebzii4vk
This commit is contained in:
Jay Vora
2008-10-14 10:50:37 +05:30
parent c3da007e62
commit c38dfe59f6
3 changed files with 6 additions and 21 deletions
-17
View File
@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>openobject-addons</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>
@@ -36,7 +36,8 @@ from report.interface import report_int
from reportlab.graphics.shapes import Drawing
from reportlab.graphics.charts.barcharts import VerticalBarChart
import reportlab.lib.colors
from reportlab.graphics import renderPM
#from reportlab.graphics import renderPM
import tools
class accounting_report1(report_sxw.rml_parse):
@@ -53,7 +54,7 @@ class accounting_report1(report_sxw.rml_parse):
drawing = Drawing(400, 200)
data = [
(13, 5, 20, 22, 37, 45, 19, 4),
(11, 3, 10, 22, 30, 25, 29, 6),
(15, 13, 4, 22, 30, 25, 29, 6),
]
bc = VerticalBarChart()
bc.x = 50
@@ -72,7 +73,8 @@ class accounting_report1(report_sxw.rml_parse):
bc.categoryAxis.categoryNames = ['Jan-99','Feb-99','Mar-99',
'Apr-99','May-99','Jun-99','Jul-99','Aug-99']
drawing.add(bc)
renderPM.drawToFile(drawing, 'example1.jpg','jpg')
drawing.save(formats=['png'],fnRoot=tools.config['root_path']+"/Image",title="helo")
# renderPM.drawToFile(drawing, 'example1.jpg','jpg')
return True
@@ -128,7 +128,7 @@
</td>
</tr>
</blockTable>
<image file="//home/jvo/ws_bazaar/server/bin/example1.png"/>
<image file="//home/jvo/ws_bazaar/server/bin/Image.png"/>
<para style="P1">
<font color="white"> </font>
</para>