Re: [web2py] Re: Need to save a multipage PDF

2012-11-22 Thread Mandar Vaze
I did some debugging using firebug - Here is what is happening : When I choose HTML report there is a POST (posts form data - essentially filters selected by user) followed by GET (actual HTML page is returned from the template) But when I choose PDF report - I don't see any POST/GET in the fire

Re: [web2py] Re: Need to save a multipage PDF

2012-11-22 Thread Mandar Vaze
> > return response.stream(open(request.folder+'/static/temp.pdf', > 'rb'),chunk_size=4096) > # pdf.output(pfile, 'F') > redirect(URL("index")) > Will the execution ever reach redirect statement above ? I'm interested because I have a report page which generates the reports based

[web2py] Re: Need to save a multipage PDF

2012-11-21 Thread Paul Rykiel
Oh I am sorry, the answer was simple I just had to move the following line outside of the for loop pdf = FPDF() for row in rows ... instead of for row in Rows() pdf = FPDF() On Wednesday, November 21, 2012 2:18:50 AM UTC-6, LightDot wrote: > This group is a

Re: [web2py] Re: Need to save a multipage PDF

2012-11-21 Thread Paul Rykiel
thats what I did ... I couldn't believe how I missed that On Wednesday, November 21, 2012 4:06:52 AM UTC-6, Javier Pepe wrote: > Try this: > > def taggen_print(): > *pdf = FPDF()* > rows = db(db.bike_no.id > 0).select() > for row in rows: >tag_no = row.bike_typ+str(row.id) >

Re: [web2py] Re: Need to save a multipage PDF

2012-11-21 Thread Javier Pepe
Try this: def taggen_print(): *pdf = FPDF()* rows = db(db.bike_no.id > 0).select() for row in rows: tag_no = row.bike_typ+str(row.id) pfile = tag_no+'_p.pdf' pdf.add_page() pdf.set_font('Arial', 'B', 14) pdf.cell(40,10,tag_no) * pdf.AddPage()* *

[web2py] Re: Need to save a multipage PDF

2012-11-21 Thread LightDot
This group is a wealth of information for other users, so when you can, please do post what is it that you've figured out. :) It's highly likely someone will have the same or similar problem and search for answers. Regards, Ales On Wednesday, November 21, 2012 6:36:04 AM UTC+1, Paul Rykiel wro

[web2py] Re: Need to save a multipage PDF

2012-11-20 Thread Paul Rykiel
Nevermind ... figured it out On Tuesday, November 20, 2012 3:06:22 PM UTC-6, Paul Rykiel wrote: > > Greetings everyone, > > this is my code and I am having difficulity creating a "Multipage" PDF to > save to a directory. > any assistance will be welcomed. > > Regards, > > def taggen_print():