[Seaside] creating respons to feed into pdfcreator

Boris Popov, DeepCove Labs boris at deepcovelabs.com
Mon Jan 10 12:19:30 UTC 2011

I don’t believe I have access to update that section, which I’d be happy to do.





DeepCove Labs Ltd.

+1 (604) 689-0322

4th floor, 595 Howe Street

Vancouver, British Columbia

Canada V6C 2T5



PacNet Services (Europe) Ltd.

+353 (0)61 714-360

Shannon Airport House, SFZ

County Clare, Ireland





This email is intended only for the persons named in the message header. Unless otherwise indicated, it contains information that is private and confidential. If you have received it in error, please notify the sender and delete the entire message including any attachments.


Thank you.


From: a van schijndel [mailto:avanschijndel at oxius.nl] 
Sent: 10 January 2011 12:16
To: Boris Popov, DeepCove Labs
Cc: Seaside - general discussion
Subject: RE: [Seaside] creating respons to feed into pdfcreator


Op maandag 10-01-2011 om 01:12 uur [tijdzone -0800], schreef Boris Popov, DeepCove Labs: 

That code is primarily to render XHTML to a string and then feed it to PRDreactor for conversion to PDF; returning of the bytes in the response is using #respond: as expected. My latest version looks like the following at the moment,
| xhtml |
xhtml := (RenderCanvas builder)
               fullDocument: true;
               documentClass: WAHtmlDocument;
                       [:root |
                       root beXhtml10Strict.
                       root style add: (Styles default documentForFile: 'print.css').
                       root style add: 'svg {-ro-replacedelement: ''com.realobjects.xml.formatters.SVGFormatter'';}'];
               render: [:html | html render: self].
^(PDFreactorClient default convertXHTML: xhtml) bytes

Thanks a lot Boris. That is exactly what I needed. I did a first quick implementation and it works for me too. Have to look into my composition of stylesheets to get it right. Maybe this code snippet can be added to the PDF faq on seaside.st?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20110110/2933a97d/attachment.htm

More information about the seaside mailing list