This this instead of @SetupRender: @OnEvent(EventConstants.ACTIVATE) StreamResponse onActivate() { InputStream myPdfStream = // build your pdf.... return new PDFStreamResponse(myPdfStream,"MyPDF"); }
On Wed, Apr 6, 2011 at 9:16 AM, Jens Reufsteck <jens.reufst...@staufenbiel.de> wrote: > I’m trying to call a page, that returns a dynamically generated pdf instead > of html. No problem with component events. But I just want to call something > like www.mydomain.de/example.pdf. > > What I've tried is: > > public boolean setupRender() throws IOException { > > ... > > OutputStream out = > response.getOutputStream("application/pdf"); > > pdfService.getCvPdf( > out, > veraid, > sid); > > out.flush(); > > // skip render process > return false; > } > > But this results in an exception "Page xy did not generate any markup when > rendered". > > I understand, that this is probably not exactly, what Tapestry pages are > for. But I wanted to avoid something more complex like writing a pdf > dispatcher ... > > Thanks for any hint > Jens > > -- > Jens Reufsteck > Marketing & Online Director > > Staufenbiel Institut GmbH > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org