[Seaside] creating respons to feed into pdfcreator
philippe.marschall at gmail.com
Sun Jan 9 10:09:13 UTC 2011
2011/1/6 a van schijndel <avanschijndel at oxius.nl>
> I am updating my application to seaside30. To create pdf I use prince2 executable. The htmlcontent to feed into the prince executable is created with a construction as described in http://www.seaside.st/documentation/pdfs in the section of pdfReactor at message asPDF .
> I am trying to understand how to do this in seaside30 but have trouble to find a way to do it now the respons is generated using a notification and response is only accessible via (current)requestContext.
> original example:
> | handler response |
> handler := WARenderContinuation root: (PDFRoot for: self).
> response := WAResponse new.
> handler context: (WARenderingContext new session: self session; actionUrl: WAUrl new; yourself).
> handler processRendering: response.
> ^(PDFReactorClient default convertXHTML: response contents contents) getPDF.
That's really strange code. I would do something like this:
self requestContext respond: [ :response |
nextPutAll: thePdf ]
callback: [ self answerPdf ]
with: 'donload PDF'
However that doesn't cover how the PDF is actually created. I have no
idea how PDFReactor works, does it render the current or an other page
as HTML send it to a server and get it back as PDF?
More information about the seaside