[Seaside] File for download

Boris Popov, DeepCove Labs boris at deepcovelabs.com
Fri Jul 8 14:06:59 UTC 2011


Once you have the bytes in hand the following should do the trick,

self requestContext respond: 
	[:response |
	response document: ((#[1 2 3] seasideMimeDocument)
					mimeType: 'application/pdf';
					fileName: 'report.pdf';


-----Original Message-----
From: seaside-bounces at lists.squeakfoundation.org
[mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf Of Louis
Sent: Friday, July 08, 2011 10:02 AM
To: seaside at lists.squeakfoundation.org
Subject: [Seaside] File for download


I'm playing with wkhtmltopdf that can convert html/css into a PDF file.
If anyone is interested it can be found here:
http://code.google.com/p/wkhtmltopdf/.  It should run on Windows and
Linux (I've tested it on Windows).  It is run as a command line program.
You give it a URL or html input filename and an output pdf filename
(where it writes the pdf file).  So far I like it but it would be nice
if it broke pages at table row and not in the middle of a row.

Now to my question.  What is the best way to deliver the file for
I can put the file where Apache can download it.  Or I can read it into
a string and serve it up from Seaside.

If I go the Apache route, how would I automatically trigger the download
after creating the file?

If I serve it from Seaside, how do I do that?

Many thanks in advance, Lou
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:Lou at Keystone-Software.com http://www.Keystone-Software.com

seaside mailing list
seaside at lists.squeakfoundation.org

More information about the seaside mailing list