#1 is the real trick. The way I finally got a working implementation was to
simply establish an HttpSession to Tapestry to call up the Page requested.
Basically mimicing a web browser. I can then capture the OutputStream that
way and convert to String, etc for rendering to pdf.

There's extra overhead, plus special account handling for this "worker"
session since the Tapestry application is user restricted, but it works.

Time permitting, I'll investigate the blog you reference since it might be a
cleaner solution.

Thanks for the pointers!


On Mon, Aug 24, 2009 at 3:26 PM, Andreas Andreou <andy...@di.uoa.gr> wrote:

> The process should be:
> 1) render the page to a String, perhaps
> http://www.behindthesite.com/blog/C1931765677/E2094832857/index.html can
> help
>
> 2) convert the html String to pdf, see
> http://www.javaworld.com/javaworld/jw-04-2006/jw-0410-html.html and/or
>
> http://codedeliver.blogspot.com/2009/07/converting-xhtml-html-to-pdf-with-css.html
>
> So, it's possible to create a Tapestry service that will do the above
> and write the pdf
> to the output stream... or, perhaps even better, write a ServletFilter
> that swaps the
> response stream with its own, forwards to the Tapestry servlet and
> when that returns
> does the post-processing (of converting the contents of its internal
> stream from html to
> pdf)
>
>
> On Mon, Aug 24, 2009 at 10:19 PM, Andreas Andreou<andy...@di.uoa.gr>
> wrote:
> > The process should be:
> > 1
> >
> > On Fri, Aug 14, 2009 at 10:48 PM, Nathan Beemer<beem...@ksu.edu> wrote:
> >> I have a need to make my Tapestry 4.1 Pages available in pdf format but
> >> having no luck to-date on my own.
> >> My apologies if soliciting this list is inappropriate here, but I do
> have a
> >> consulting budget available to get this done if anyone is interested.
> >>
> >
> >
> >
> > --
> > Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr
> > Tapestry / Tacos developer
> > Open Source / JEE Consulting
> >
>
>
>
> --
> Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr
> Tapestry / Tacos developer
> Open Source / JEE Consulting
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to