You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by aash <aa...@stdio.com> on 2010/06/10 19:25:34 UTC
PDF, Flying Saucer, render event vs component event
I'm trying to create a button that will take the *current* page, and stream
it back as a PDF. I have seen that I can use a MarkupWriter in afterRender
to get the html of the current page. Also, i have kludged an onActivate()
to return a PDFStreamResponse that will stream a PDF to the page correctly.
I also did a very ugly thing which is use httpClient to go fetch another
version of the current page, render it (using Flying Saucer) and send it to
the browser. That kinda works, but fails on blackbird.css and sometimes on
default.css, so the PDF comes down with snippets of CSS in it, and of course
the CSS not rendering the page properly. (The error comes back that the
stream is closed).
What I'm having trouble wrapping my head around is: how do i get a
MarkupWriter in onActivate(), or, how can I stream my PDFStreamResponse from
onAfterRender() or someplace like that?
I think there is some small thing that my brain hasn't connected yet!
aash
--
View this message in context: http://old.nabble.com/PDF%2C-Flying-Saucer%2C-render-event-vs-component-event-tp28846126p28846126.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org