Have you looked at
http://webware.colorstudy.net/twiki/bin/view/Webware/PdfCreationWithReportLa
b001 ?

- Geoff

> -----Original Message-----
> From: Tim Roberts [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 04, 2002 4:15 PM
> To: [EMAIL PROTECTED]
> Subject: [Webware-discuss] Reportlab?
> 
> 
> This message is only marginally related to webware, but you 
> folks have 
> probably run up against this.
> 
> I have a webware site in which I need to produce reasonably 
> good looking 
> printed output.  We all know that the current generation of 
> browsers has an 
> extremely high degree of suckage in its ability to render 
> tabular-formatted 
> printed output.  So, I decided to use ReportLab to produce PDF files.
> 
> Overall, I am delighted with the results.  I get a huge 
> amount of control and 
> flexibility, and it looks exactly right on everyone's 
> computer.  However, I'm 
> not entirely happy with the mechanism.
> 
> Here's the way I would LIKE it to work.
> 1. User fills out form, clicks submit.
> 2. Form fires Webware servlet.
> 3. Servlet returns magic header that tells the browser "whoops, here
>    comes PDF data".
> 4. Browser gives familiar "run from here or save to disk" 
> dialog, or else
>    fires Acrobat Reader inside browser.
> 
> I can't seem to make this happen automagically.  What I do 
> now is have the 
> Webware servlet render to a PDF file on the server, then send 
> the browser a 
> redirect to that file.  That way, the browser sees the PDF 
> extension on the 
> URL and does the right thing.
> 
> I don't like this, for several reasons: if I use a single 
> file name, I limit 
> my number of concurrent users to 1 (that's not a problem 
> today, but it will 
> be).  If I use generated file names, I have to manage them 
> somehow.  I don't 
> really need to retain the PDF files at all.
> 
> So, is there a way that a Webware servlet can generate 
> something that passes 
> through Apache and looks to the browser as if it were a PDF 
> binary, without 
> using this redirect trick?  I tried various permutations of 
> "Content-Type", 
> including application/pdf, but I didn't come up with the right recipe.
> 
> (One alternative is for me to do an immediate redirect to a 
> Python script 
> that happens to be named "xxxx.pdf"; this also works, but 
> seems sort of 
> illegitimate.)
> 
> --
> - Tim Roberts, [EMAIL PROTECTED]
>   Providenza & Boekelheide, Inc.
> 
> 
> 
> _______________________________________________________________
> 
> Don't miss the 2002 Sprint PCS Application Developer's Conference
> August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
> 
> _______________________________________________
> Webware-discuss mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/webware-discuss
> 

_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to