cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eike Jordan <jor...@fiz-chemie.de>
Subject Re: redirect output to filesystem
Date Thu, 30 Jul 2009 08:08:32 GMT
Chris Gow wrote:
> Unfortunately, that transformer does not seem to appear in cocoon 2.0.x 
> (which is the version of cocoon I am stuck on).

i recently got a similar problem and solved it with something like

var pdf = File.createTempFile("tmp", ".pdf");
pdf.deleteOnExit();
var pdf_out = new FileOutputStream(pdf);

cocoon.processPipelineTo(pdf_url, {pdf_path: pdf.getPath()}, pdf_out);

~eike

> 
> -- chris
> 
> On 07/29/2009 12:09 PM, Robby Pelssers wrote:
>> Not sure ... but can't you just use the source-write transformer?
>>
>> Robby
>>
>> -----Original Message-----
>> From: Chris Gow [mailto:cgow@commsolv.com]
>> Sent: Tuesday, July 28, 2009 5:45 PM
>> To: users@cocoon.apache.org
>> Subject: redirect output to filesystem
>>
>> Hi:
>>
>> I'm trying to figure out if it is possible to redirect the output from a
>>
>> sitemap request to the file system (where cocoon is running) instead of
>> the browser.
>>
>> My situation is as follows. I generate a html view of a document to a
>> user, if the user finds the content of this document acceptable. They
>> are given an option to 'save' the document as a pdf on the server. I'm
>> trying to find a way to redirect the output from the fop serializer to
>> the server and not to the browser. Ideally, I would like to avoid
>> sending the generated pdf to the browser and instead send some other
>> indicator (eg. Success! or something)
>>
>> One thing to keep in mind...I'm using a really, really old version of
>> cocoon: 2.0.3 :(.
>>
>> Any ideas/solutions are welcome, even if it is not cocoon specific
>> though I would prefer a cocoon solution.
>>
>> thanks
>>
>> -- chris
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>>    
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 


-- 
Eike Jordan  <jordan@fiz-chemie.de>

| FIZ CHEMIE BERLIN
| Franklin Str. 11               ------    ,__o
| 10587 Berlin                  ------   _-\_<,
|                              ------   (+)/'(+)
| Tel. : 0049-30-39977 214


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message