Hi i want create invoice like this image
i use Reportlap
and for my header i use SPAN
but my output is it :
my code is :
from reportlab.lib import colors
from reportlab.lib.pagesizes import letter, inch,A5
from reportlab.platypus import Image, Paragraph, SimpleDocTemplate, Table
from reportlab.lib.styles import getSampleStyleSheet
doc = SimpleDocTemplate("complex_cell_values.pdf", pagesize=A5)
elements = []
styleSheet = getSampleStyleSheet()
I = Image('replogo.gif')
I.drawHeight = 1.6*inch
I.drawWidth = 5*inch
data= [['','',I,'',''],
['Total Price', 'Price', 'QTY','Description', 'S.No'],
['00', 'rial 360,000', '02', '05', '04'],
['10', '11', '12', '06', '14'],
['20', '21', '22', '23', '24'],
['30', '31', '32', '33', '34']]
t=Table(data,style=[('BOX',(0,0),(-1,-1),2,colors.black),
('GRID',(0,1),(-1,-1),0.5,colors.black),
('SPAN',(0,0),(1,0)),
('SPAN',(3,0),(4,0)),
('ALIGN',(1,0),(4,-1),'CENTER')
])
t._argW[3]=1.5*inch
elements.append(t)
doc.build(elements)
anybody have ab idea how can i fix this ?