[reportlab-users] Problem printing with lulu.com

Roberto Alsina ralsina at netmanagers.com.ar
Wed Apr 14 06:44:31 EDT 2010


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


On Wednesday 14 April 2010 07:39:22 Roberto Alsina wrote:

> On Wednesday 14 April 2010 06:33:37 Robin Becker wrote:

> > Not sure where the Times-Roman stuff is coming in from.

>

> The Times-Roman for some reason appears if there is a table.

>

> Here's a short test case:

>

> #!/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=[]

> ts=TableStyle([('GRID',(0,0),(-1,-1),0.25,"black"),

> ('BOX',(0,0),(-1,-1),0.25,"black")]

> )

> styles = getSampleStyleSheet()

> doc = SimpleDocTemplate("phello.pdf")

>

> cell=[Paragraph('A',styles['Normal']),

> Paragraph('B',styles['Normal'])]

> Story=[Table([[cell]],style=ts)]

> doc.build(Story)

>

> go()

>

> Running it with reportlab 2.4, pdffonts report this:

>

> [ralsina at hp input]$ pdffonts phello.pdf

> name type emb sub uni object

> ID ------------------------------------ ----------------- --- --- ---

> --------- Helvetica Type 1 no no

> no 2 0 Times-Roman Type 1 no

> no no 3 0

>

> I am attaching the generated file.



More information about the reportlab-users mailing list