XWiki Groovy script to return binary data
I am writing a Groovy script to run in an XWiki page. It needs to output binary data (a PDF). I know how to response.setContentType("application/pdf"); but how do I prevent the XWiki engine from outputting the normal page header/footer? I want to take total control of the page output. Any tips would be appreciated! Stephen
Hi, you can add to the URL of the page ?xpage=plain Jérémi On 9/10/05, Stephen Schaub <[email protected]> wrote:
I am writing a Groovy script to run in an XWiki page. It needs to output binary data (a PDF). I know how to
response.setContentType("application/pdf");
but how do I prevent the XWiki engine from outputting the normal page header/footer? I want to take total control of the page output. Any tips would be appreciated!
Stephen
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
-- portable : 06.73.20.11.49 http://www.jeremi.info http://www.xwiki.com - http://www.moovement.com skype: jeremi23
There is also $context.setFinished(true) which is even better because this way there is not even a getWrite() which could conflict with a getOutputStream Ludovic jeremi joslin wrote:
Hi, you can add to the URL of the page ?xpage=plain
Jérémi
On 9/10/05, Stephen Schaub <[email protected]> wrote:
I am writing a Groovy script to run in an XWiki page. It needs to output binary data (a PDF). I know how to
response.setContentType("application/pdf");
but how do I prevent the XWiki engine from outputting the normal page header/footer? I want to take total control of the page output. Any tips would be appreciated!
Stephen
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
------------------------------------------------------------------------
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
-- Ludovic Dubost XPertNet: http://www.xpertnet.fr/ Blog: http://www.ludovic.org/blog/ XWiki: http://www.xwiki.com Skype: ldubost AIM: nvludo Yahoo: ludovic
participants (3)
-
jeremi joslin -
Ludovic Dubost -
Stephen Schaub