[reportlab-users] Problem printing with lulu.com

Roberto Alsina ralsina at netmanagers.com.ar
Wed Apr 14 07:09:41 EDT 2010


On Wednesday 14 April 2010 07:44:31 Roberto Alsina wrote:

> Ignore this, I am obviously using times-roman font there :-(


Ok, a real test case now. If you use a table, Times-Roman pops up in the
output. If you don't, there's only Helvetica.



#!/usr/bin/env python
# -*- coding: utf-8 -*-

from reportlab.platypus import SimpleDocTemplate, Paragraph
from reportlab.platypus.tables import *
from reportlab.lib.styles import getSampleStyleSheet

def go():
Story=[]
doc = SimpleDocTemplate("phello.pdf")

cell=[Paragraph('A',ParagraphStyle(name='Normal',
fontName='Helvetica',
fontSize=10,
leading=12)),]
# This story has only Helvetica
#Story=cell
# This one has helvetica and Times-Roman
Story=cell+[Table([[cell]])]
doc.build(Story)

go()


More information about the reportlab-users mailing list