<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>Re: [Seaside] WAComponent and HTML Emails?</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>1. Google for PDFReactor, I really enjoy the degree to which the documents can be customized and its rendering engine with support for SVG creates great results.<BR>
2. Ignore it, our application is built around sessions owned by contacts, so this just simulates full context for components to render on a stream that is later fed to a PDF generator with matching styles.<BR>
<BR>
Cheers!<BR>
<BR>
-Boris<BR>
(Sent from a BlackBerry)<BR>
<BR>
----- Original Message -----<BR>
From: seaside-bounces@lists.squeakfoundation.org <seaside-bounces@lists.squeakfoundation.org><BR>
To: 'Seaside - general discussion' <seaside@lists.squeakfoundation.org><BR>
Sent: Fri Aug 10 08:47:14 2007<BR>
Subject: RE: [Seaside] WAComponent and HTML Emails?<BR>
<BR>
Hi Boris,<BR>
<BR>
can you tell which pdf generation tool are you using? I'm not sure<BR>
about understanding right the contact part in "Component>>asPDF: contact"<BR>
<BR>
cheers,<BR>
<BR>
Sebastian Sastre<BR>
<BR>
> -----Mensaje original-----<BR>
> De: seaside-bounces@lists.squeakfoundation.org<BR>
> [<A HREF="mailto:seaside-bounces@lists.squeakfoundation.org">mailto:seaside-bounces@lists.squeakfoundation.org</A>] En nombre<BR>
> de Boris Popov<BR>
> Enviado el: Jueves, 09 de Agosto de 2007 15:49<BR>
> Para: Seaside - general discussion<BR>
> Asunto: RE: [Seaside] WAComponent and HTML Emails?<BR>
><BR>
> I've rendered components to feed our PDF generator, sounds<BR>
> like it would be similar to just get the HTML back. You'll<BR>
> need to add a bit of context yourself, as this is ripped<BR>
> straight out of the system, see last line there in #renderPDF<BR>
> that would be the string you need.<BR>
><BR>
> Component>>asPDF: contact<BR>
> ^WACurrentSession<BR>
> use: (self createPDFSession: contact)<BR>
> during: [self renderPDF].<BR>
><BR>
> Component>>createPDFSession: contact<BR>
> ^(PDFSession new)<BR>
> setParent: MyAppRoot application;<BR>
> attachContact: contact;<BR>
> yourself.<BR>
><BR>
> Component>>renderPDF<BR>
> | handler response |<BR>
> handler := WARenderHandler root: (PDFRoot for: self).<BR>
> response := WAResponse new.<BR>
> handler<BR>
> context:<BR>
> ((WARenderingContext new)<BR>
> session: self session;<BR>
> actionUrl: WAUrl new;<BR>
> yourself).<BR>
> handler processRendering: response.<BR>
> ^response contents contents.<BR>
><BR>
> Hope this helps,<BR>
><BR>
> -Boris<BR>
><BR>
> --<BR>
> +1.604.689.0322<BR>
> DeepCove Labs Ltd.<BR>
> 4th floor 595 Howe Street<BR>
> Vancouver, Canada V6C 2T5<BR>
> <A HREF="http://tinyurl.com/r7uw4">http://tinyurl.com/r7uw4</A><BR>
><BR>
> boris@deepcovelabs.com<BR>
><BR>
> CONFIDENTIALITY NOTICE<BR>
><BR>
> This email is intended only for the persons named in the<BR>
> message header. Unless otherwise indicated, it contains<BR>
> information that is private and confidential. If you have<BR>
> received it in error, please notify the sender and delete the<BR>
> entire message including any attachments.<BR>
><BR>
> Thank you.<BR>
><BR>
> > -----Original Message-----<BR>
> > From: seaside-bounces@lists.squeakfoundation.org [<A HREF="mailto:seaside-">mailto:seaside-</A><BR>
> > bounces@lists.squeakfoundation.org] On Behalf Of Ramon Leon<BR>
> > Sent: Thursday, August 09, 2007 11:43 AM<BR>
> > To: 'Seaside - general discussion'<BR>
> > Subject: [Seaside] WAComponent and HTML Emails?<BR>
> ><BR>
> > Has anyone ever rendered a WAComponent to a string for use<BR>
> in an HTML<BR>
> > formatted email?<BR>
> ><BR>
> > Ramon Leon<BR>
> > <A HREF="http://onsmalltalk.com">http://onsmalltalk.com</A><BR>
> ><BR>
> > _______________________________________________<BR>
> > Seaside mailing list<BR>
> > Seaside@lists.squeakfoundation.org<BR>
> > <A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A><BR>
> _______________________________________________<BR>
> Seaside mailing list<BR>
> Seaside@lists.squeakfoundation.org<BR>
> <A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A><BR>
<BR>
_______________________________________________<BR>
Seaside mailing list<BR>
Seaside@lists.squeakfoundation.org<BR>
<A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A><BR>
</FONT>
</P>
</BODY>
</HTML>