<!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 &lt;seaside-bounces@lists.squeakfoundation.org&gt;<BR>
To: 'Seaside - general discussion' &lt;seaside@lists.squeakfoundation.org&gt;<BR>
Sent: Fri Aug 10 08:47:14 2007<BR>
Subject: RE: [Seaside] WAComponent and HTML Emails?<BR>
<BR>
Hi Boris,<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; can you tell which pdf generation tool are you using? I'm not sure<BR>
about understanding right the contact part in &quot;Component&gt;&gt;asPDF: contact&quot;<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cheers,<BR>
<BR>
Sebastian Sastre<BR>
<BR>
&gt; -----Mensaje original-----<BR>
&gt; De: seaside-bounces@lists.squeakfoundation.org<BR>
&gt; [<A HREF="mailto:seaside-bounces@lists.squeakfoundation.org">mailto:seaside-bounces@lists.squeakfoundation.org</A>] En nombre<BR>
&gt; de Boris Popov<BR>
&gt; Enviado el: Jueves, 09 de Agosto de 2007 15:49<BR>
&gt; Para: Seaside - general discussion<BR>
&gt; Asunto: RE: [Seaside] WAComponent and HTML Emails?<BR>
&gt;<BR>
&gt; I've rendered components to feed our PDF generator, sounds<BR>
&gt; like it would be similar to just get the HTML back. You'll<BR>
&gt; need to add a bit of context yourself, as this is ripped<BR>
&gt; straight out of the system, see last line there in #renderPDF<BR>
&gt; that would be the string you need.<BR>
&gt;<BR>
&gt; Component&gt;&gt;asPDF: contact<BR>
&gt;&nbsp;&nbsp; ^WACurrentSession<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; use: (self createPDFSession: contact)<BR>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; during: [self renderPDF].<BR>
&gt;<BR>
&gt; Component&gt;&gt;createPDFSession: contact<BR>
&gt;&nbsp; ^(PDFSession new)<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; setParent: MyAppRoot application;<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; attachContact: contact;<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; yourself.<BR>
&gt;<BR>
&gt; Component&gt;&gt;renderPDF<BR>
&gt;&nbsp; | handler response |<BR>
&gt;&nbsp; handler := WARenderHandler root: (PDFRoot for: self).<BR>
&gt;&nbsp; response := WAResponse new.<BR>
&gt;&nbsp; handler<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; context:<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((WARenderingContext new)<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; session: self session;<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; actionUrl: WAUrl new;<BR>
&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; yourself).<BR>
&gt;&nbsp; handler processRendering: response.<BR>
&gt;&nbsp; ^response contents contents.<BR>
&gt;<BR>
&gt; Hope this helps,<BR>
&gt;<BR>
&gt; -Boris<BR>
&gt;<BR>
&gt; --<BR>
&gt; +1.604.689.0322<BR>
&gt; DeepCove Labs Ltd.<BR>
&gt; 4th floor 595 Howe Street<BR>
&gt; Vancouver, Canada V6C 2T5<BR>
&gt; <A HREF="http://tinyurl.com/r7uw4">http://tinyurl.com/r7uw4</A><BR>
&gt;<BR>
&gt; boris@deepcovelabs.com<BR>
&gt;<BR>
&gt; CONFIDENTIALITY NOTICE<BR>
&gt;<BR>
&gt; This email is intended only for the persons named in the<BR>
&gt; message header. Unless otherwise indicated, it contains<BR>
&gt; information that is private and confidential. If you have<BR>
&gt; received it in error, please notify the sender and delete the<BR>
&gt; entire message including any attachments.<BR>
&gt;<BR>
&gt; Thank you.<BR>
&gt;<BR>
&gt; &gt; -----Original Message-----<BR>
&gt; &gt; From: seaside-bounces@lists.squeakfoundation.org [<A HREF="mailto:seaside-">mailto:seaside-</A><BR>
&gt; &gt; bounces@lists.squeakfoundation.org] On Behalf Of Ramon Leon<BR>
&gt; &gt; Sent: Thursday, August 09, 2007 11:43 AM<BR>
&gt; &gt; To: 'Seaside - general discussion'<BR>
&gt; &gt; Subject: [Seaside] WAComponent and HTML Emails?<BR>
&gt; &gt;<BR>
&gt; &gt; Has anyone ever rendered a WAComponent to a string for use<BR>
&gt; in an HTML<BR>
&gt; &gt; formatted email?<BR>
&gt; &gt;<BR>
&gt; &gt; Ramon Leon<BR>
&gt; &gt; <A HREF="http://onsmalltalk.com">http://onsmalltalk.com</A><BR>
&gt; &gt;<BR>
&gt; &gt; _______________________________________________<BR>
&gt; &gt; Seaside mailing list<BR>
&gt; &gt; Seaside@lists.squeakfoundation.org<BR>
&gt; &gt; <A HREF="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</A><BR>
&gt; _______________________________________________<BR>
&gt; Seaside mailing list<BR>
&gt; Seaside@lists.squeakfoundation.org<BR>
&gt; <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>