[reportlab-users] Re: long tables

Henning von Bargen reportlab-users@reportlab.com
Tue, 15 Apr 2003 14:10:03 +0200


> Message: 6
> From: "Andy Robinson" <andy@reportlab.com>
> To: <reportlab-users@reportlab.com>
> Subject: RE: [reportlab-users] long tables
> Date: Mon, 14 Apr 2003 17:24:37 +0100
> Reply-To: reportlab-users@reportlab.com
> 
> > Then the calc() function could just stop as soon as the 
> > computed height
> > for the first m rows is greater than availHeight.
> > It could then return the height computed so far
> > and maybe set a flag stating that even more rows follow.
> > With this solution, the size calculation would occur only 
> > once for each row.
> > 
> > Just an idea. Has anyone tried it? Could it cause trouble?
> > 
> 
> That's exactly what I wanted to do all along, but never 
> got around to.  Feel free to try :-)
> 
> There are 2 headaches at present we should think about.
> 
> (1) the frame used on page 2 may not be the same size as 
> the one used on page 1 and so on.  So you could cache the 
> sizing info for the table, but would have to recheck that
> page 2 was flowing into a frame of the same size before
> reusing it.  (IMHO we should size enough stuff to figure
> out the stuff for the current page, then not calculate
> the rest of the cells, as it sidesteps this).

This is exactly what I meant: 
Don't try to calculate the size of the whole table,
just enough to know that we have to split.

> 
> 
> (2) we have a basic problem with paragraphs in table
> cells, as Robin outlined a few days back.  Paragraphs
> don't have a preferred width.  What algorithm should
> be applied in a case like this (generalized to many
> rows and columns)?
> 
>  <tr>
>   <td>
>      Really really long text here in cell one, would wrap
>      over many lines of text.  Blah blah blah. 
>   </td>
>   <td>
>      Short column two.
>   </td> 
>  </tr>
>  <tr>
>   <td>
>      Short column one
>   </td>   <td>
>      Really really long text here in cell two, would wrap
>      over many lines of text.  Blah blah blah. 
>   </td>
>  </tr>
> 
> The full HTML table algorithm will kill performance
> for big multi page tables, and what's more it requires
> paper to have scrollvars which is generally not true
> in real life.  So we need to define some sensible goals.
> 
> Ideas welcome!

Well, in the general case things are getting complicated...
I'd suggest not to use the optimized calc() if columns are not fixed width.

Henning

> 
> - Andy
> 
> --__--__--
> 
> Message: 7
> From: "Andy Robinson" <andy@reportlab.com>
> To: <reportlab-users@reportlab.com>
> Subject: RE: [reportlab-users] carriage return in paragraph?
> Date: Mon, 14 Apr 2003 17:53:58 +0100
> Reply-To: reportlab-users@reportlab.com
> 
> > > actually a feature ;)
> > 
> > And a pretty nice one, believe me !
> 
> And even documented, on the very first page
> of the tables chapter.
> 
> - Andy
> 
> p.s. I don't get to say that often. It feels good ;-)
> 
> --__--__--
> 
> Message: 8
> Date: Tue, 15 Apr 2003 02:19:41 -0700 (PDT)
> From: saravanan annamalai <saravanan_anna@yahoo.com>
> To: reportlab-users@reportlab.com
> Subject: [reportlab-users] Missing T1 files!...error
> Reply-To: reportlab-users@reportlab.com
> 
> --0-589539648-1050398381=:57596
> Content-Type: text/plain; charset=us-ascii
> 
> Hi all,
>   I am a newbie to reportlab graphics.. I have installed rl graphics and i
tried to run the following... from reportlab import rl_config
> from reportlab.lib import colors
> from reportlab.graphics.shapes import *
> from reportlab.pdfgen.canvas import Canvasd = Drawing(400, 200)
> d.add(Rect(50, 50, 300, 100, fillColor=colors.yellow))
> d.add(String(150,100, 'Hello World',fontName='Times-Roman',
> fontSize=18, fillColor=colors.red))from reportlab.graphics import renderPM
> renderPM.drawToFile(d,'./example1.png',fmt='PNG')     Its saying an
error...Cant setfont(times-roman)..Missing T1 files....
> But I am able to make pdf files...and font works perfectly..............
> Hope some one will get me out of this situation Thanx from saravanan
annamalai
> 
> 
> ---------------------------------
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> --0-589539648-1050398381=:57596
> Content-Type: text/html; charset=us-ascii
> 
> <DIV>
> <DIV>Hi all,<BR>&nbsp; I am a newbie to reportlab graphics.. I have
installed rl graphics and i tried to run the following...</DIV>
> <DIV>&nbsp;</DIV>
> <DIV>from reportlab import rl_config<BR>from reportlab.lib import
colors<BR>from reportlab.graphics.shapes import *<BR>from
reportlab.pdfgen.canvas import Canvas</DIV>
> <DIV>d = Drawing(400, 200)<BR>d.add(Rect(50, 50, 300, 100,
fillColor=colors.yellow))<BR>d.add(String(150,100, 'Hello
World',fontName='Times-Roman',<BR>fontSize=18, fillColor=colors.red))</DIV>
> <DIV>from reportlab.graphics import
renderPM<BR>renderPM.drawToFile(d,'./example1.png',fmt='PNG')</DIV>
> <DIV>&nbsp;</DIV>
> <DIV>&nbsp; &nbsp; Its saying an error...Cant
setfont(times-roman)..Missing T1 files....<BR>But I am able to make pdf
files...and font works perfectly..............<BR>Hope some one will get me
out of this situation</DIV>
> <DIV>&nbsp;</DIV>
> <DIV>Thanx from saravanan annamalai</DIV></DIV><p><br><hr size=1>Do you
Yahoo!?<br>
> <a
href="http://us.rd.yahoo.com/search/mailsig/*http://search.yahoo.com">The
New Yahoo! Search</a> - Faster. Easier. Bingo.
> --0-589539648-1050398381=:57596--
> 
> 
> --__--__--
> 
> _______________________________________________
> reportlab-users mailing list
> reportlab-users@reportlab.com
> http://two.pairlist.net/mailman/listinfo/reportlab-users
> 
> 
> End of reportlab-users Digest