You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Alex Kachanov <al...@kachanov.com> on 2005/02/24 09:13:41 UTC

writing PDF file to filesystem

Hi!

I'm using Cocoon to convert docbook xml files to html and pdf

HTML files are created chunked and are put into a directory 
so they would be avalable to the web-site isitors without any 
further on-the-fly conversion by Cocoon

I managed to run "cocoon cron" component which makes html 
conversions at certain regular intervals that result in html files

I would like to do the same with PDF files. However fo2pdf 
serializer just puts the converted PDF file to cache while I just need 
to dump the serialization to a specific folder. 

Any ideas? Am I missing smth?

p.s. Yes I know about CLI but any other suggestions?

-------------------------------------
with best wishes
Alex Kachanov

Re: writing PDF file to filesystem

Posted by Geert Josten <Ge...@daidalos.nl>.
Sharp observation, I hadn't explained how it works..

You simply specify something like:

<save:file src="cocoon://path-to-pdf" target="file://path-to-pdf-on-fs"/>

The src directs to your fo2pdf pipe, the target attribute to where you want to store it. The 
transformer replaces the element by a save:result element, containing a status success or a fail 
with the error message as content. Nice to generate a report out of it...

Cheers

Alex Kachanov wrote:

> Hi!
> 
> Are you sure this should be a transformer, not a serializer?
> 
> Since in the XML-FO-PDF pipeline pdf file is created at fo2pdf serializer stage
> what would a Sourcewrite Transformer write to the disk? an FO file? 
> 
> But I need a PDF file which is the result of FoToPdf conversion done by fo2pdf serializer.
> 
> Am I missing smth?
> -------------------------------------
> with best wishes
> Alex Kachanov
> 
> ----- Original Message ----- 
> From: "Geert Josten" <Ge...@daidalos.nl>
> To: <us...@cocoon.apache.org>
> Sent: Thursday, February 24, 2005 6:05 PM
> Subject: Re: writing PDF file to filesystem
> 
> 
> 
>>Hi,
>>
>>I would suggest using a source writing transformer. Unfortunatily does the SourceWritingTransformer 
>>not support writing of non-xml stream. It shouldn't be hard to patch it to make it work. I wrote a 
>>SaveFilesTransformer myself that does the trick.
>>

-- 
Geert.Josten@Daidalos.nl
IT-consultant at Daidalos BV, Zoetermeer (NL)

http://www.daidalos.nl/
tel:+31-(0)79-3316961
fax:+31-(0)79-3316464

GPG: 1024D/12DEBB50

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


Re: writing PDF file to filesystem

Posted by Alex Kachanov <al...@kachanov.com>.
Hi!

Are you sure this should be a transformer, not a serializer?

Since in the XML-FO-PDF pipeline pdf file is created at fo2pdf serializer stage
what would a Sourcewrite Transformer write to the disk? an FO file? 

But I need a PDF file which is the result of FoToPdf conversion done by fo2pdf serializer.

Am I missing smth?
-------------------------------------
with best wishes
Alex Kachanov

----- Original Message ----- 
From: "Geert Josten" <Ge...@daidalos.nl>
To: <us...@cocoon.apache.org>
Sent: Thursday, February 24, 2005 6:05 PM
Subject: Re: writing PDF file to filesystem


> Hi,
> 
> I would suggest using a source writing transformer. Unfortunatily does the SourceWritingTransformer 
> not support writing of non-xml stream. It shouldn't be hard to patch it to make it work. I wrote a 
> SaveFilesTransformer myself that does the trick.
> 

Re: writing PDF file to filesystem

Posted by Geert Josten <Ge...@daidalos.nl>.
I'm not very confident about the general use of the transformer, so I'll just send the code to you 
personally (and to any one else who likes)...

Cheers

Alex Kachanov wrote:

> could you please share this piece of code with community?
> -------------------------------------
> with best wishes
> Alex Kachanov
> 
> ----- Original Message ----- 
> From: "Geert Josten" <Ge...@daidalos.nl>
> To: <us...@cocoon.apache.org>
> Sent: Thursday, February 24, 2005 6:05 PM
> Subject: Re: writing PDF file to filesystem
> 
> 
> 
>>Hi,
>>
>>I would suggest using a source writing transformer. Unfortunatily does the SourceWritingTransformer 
>>not support writing of non-xml stream. It shouldn't be hard to patch it to make it work. I wrote a 
>>SaveFilesTransformer myself that does the trick.
>>
>>Cheers
>>

-- 
Geert.Josten@Daidalos.nl
IT-consultant at Daidalos BV, Zoetermeer (NL)

http://www.daidalos.nl/
tel:+31-(0)79-3316961
fax:+31-(0)79-3316464

GPG: 1024D/12DEBB50

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


Re: writing PDF file to filesystem

Posted by Geert Josten <Ge...@daidalos.nl>.
How and where? I could just send the piece of code, but there must be a better way I guess..

Cheers

Alex Kachanov wrote:

> could you please share this piece of code with community?
> -------------------------------------
> with best wishes
> Alex Kachanov
> 
> ----- Original Message ----- 
> From: "Geert Josten" <Ge...@daidalos.nl>
> To: <us...@cocoon.apache.org>
> Sent: Thursday, February 24, 2005 6:05 PM
> Subject: Re: writing PDF file to filesystem
> 
> 
> 
>>Hi,
>>
>>I would suggest using a source writing transformer. Unfortunatily does the SourceWritingTransformer 
>>not support writing of non-xml stream. It shouldn't be hard to patch it to make it work. I wrote a 
>>SaveFilesTransformer myself that does the trick.
>>
>>Cheers
>>

-- 
Geert.Josten@Daidalos.nl
IT-consultant at Daidalos BV, Zoetermeer (NL)

http://www.daidalos.nl/
tel:+31-(0)79-3316961
fax:+31-(0)79-3316464

GPG: 1024D/12DEBB50

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


Re: writing PDF file to filesystem

Posted by Alex Kachanov <al...@kachanov.com>.
could you please share this piece of code with community?
-------------------------------------
with best wishes
Alex Kachanov

----- Original Message ----- 
From: "Geert Josten" <Ge...@daidalos.nl>
To: <us...@cocoon.apache.org>
Sent: Thursday, February 24, 2005 6:05 PM
Subject: Re: writing PDF file to filesystem


> Hi,
> 
> I would suggest using a source writing transformer. Unfortunatily does the SourceWritingTransformer 
> not support writing of non-xml stream. It shouldn't be hard to patch it to make it work. I wrote a 
> SaveFilesTransformer myself that does the trick.
> 
> Cheers
> 

Re: writing PDF file to filesystem

Posted by Geert Josten <Ge...@daidalos.nl>.
Put the act in a match that somehow takes two parameters (request or other). One to denote the 
source, the other to denote the target. Use the same strategy as before to 'xinclude' the result of 
the acts, except that you don't do a writefiles transform afterwards...

If this is described too short for you, just say so and i'll try again.. ;)

Cheers

Lars Huttar wrote:

> Sylvain Wallez wrote:
> 
>>
>> You can also use the copy-source action which handles sources as 
>> binary streams. And architecturally speaking, it's a bit less ugly 
>> than the source-transformer :-)
>>
>> <map:act type="copy-source" src="cocoon://pipeline-that-creates-a.pdf">
>>  <map:parameter name="dest" value="path/to/file.pdf"/>
>> </map:act>
>>
>> Sylvain
>>
> Wow, thanks for this tidbit. I had not run across this action.
> Somebody should put this in the documentation where it can be found 
> (http://cocoon.apache.org/2.1/userdocs/actions/actions.html) (I know, we 
> hear that all the time).
> Looks like it's fairly new anyway.
> 
> Applying this to the task:
> My task is to copy a directory tree of static files from one location to 
> another. The set of files should not be considered fixed.
> 
> The current approach is to generate a list of the fiels using 
> directory-generator, massage to add XInclude and Source-write markup, 
> and run the result through the XInclude and source-writing transformers.
> 
> If I were to do the copying with actions, I'd have to be able to "run" a 
> dynamically-generated list of actions.
> Is there a way to do that?
> Do I use flowscript?
> 
> Lars
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
> 

-- 
Geert.Josten@Daidalos.nl
IT-consultant at Daidalos BV, Zoetermeer (NL)

http://www.daidalos.nl/
tel:+31-(0)79-3316961
fax:+31-(0)79-3316464

GPG: 1024D/12DEBB50

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


Re: writing PDF file to filesystem

Posted by Lars Huttar <la...@sil.org>.
Sylvain Wallez wrote:

>
> You can also use the copy-source action which handles sources as 
> binary streams. And architecturally speaking, it's a bit less ugly 
> than the source-transformer :-)
>
> <map:act type="copy-source" src="cocoon://pipeline-that-creates-a.pdf">
>  <map:parameter name="dest" value="path/to/file.pdf"/>
> </map:act>
>
> Sylvain
>
Wow, thanks for this tidbit. I had not run across this action.
Somebody should put this in the documentation where it can be found 
(http://cocoon.apache.org/2.1/userdocs/actions/actions.html) (I know, we 
hear that all the time).
Looks like it's fairly new anyway.

Applying this to the task:
My task is to copy a directory tree of static files from one location to 
another. The set of files should not be considered fixed.

The current approach is to generate a list of the fiels using 
directory-generator, massage to add XInclude and Source-write markup, 
and run the result through the XInclude and source-writing transformers.

If I were to do the copying with actions, I'd have to be able to "run" a 
dynamically-generated list of actions.
Is there a way to do that?
Do I use flowscript?

Lars


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


Re: writing PDF file to filesystem

Posted by Sylvain Wallez <sy...@apache.org>.
Lars Huttar wrote:

> Geert Josten wrote:
>
>> Hi,
>>
>>> Doesn't it? It allows you to specify the serializer. I've never used 
>>> it, but I've seen the code there. By default it uses the XML 
>>> serializer, you just need to specify another.
>>>
>>> Am I missing something?
>>>
>>> Regards, Upayavira
>>
>>
>>
>> Hmmm it _is_ possible with the SourceWritingTransformer, but only 
>> because XSL-FO is XML and there is a serializer that can convert the 
>> FO XML to PDF, which can be directly written to disk by this 
>> transformer.
>>
>> But what if you want to write something that isn't derived from XML? 
>> You can't just insert binary data into the <source:fragment> element 
>> and make it be written to some file...
>
>
>
> Actually you can; I have been doing that for some time (see my post of 
> today, "how to copy a binary file"). I wrap a <dummy> element around 
> the file contents.
> It may not be legal XML if it contains non-Unicode characters, but it 
> works.
> It's not pretty though...


You can also use the copy-source action which handles sources as binary 
streams. And architecturally speaking, it's a bit less ugly than the 
source-transformer :-)

<map:act type="copy-source" src="cocoon://pipeline-that-creates-a.pdf">
  <map:parameter name="dest" value="path/to/file.pdf"/>
</map:act>

Sylvain

-- 
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }


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


Re: writing PDF file to filesystem

Posted by Lars Huttar <la...@sil.org>.
Geert Josten wrote:

> Not the quickest solution I guess...
>
> :-P
>
Probably not the most efficient... but lest someone think I'm writing 
those &#xyz; entity references by hand, I'm not.
They're produced when the files are read in by the xinclude transformer 
(<xi:include parse="text" ...>).
Lars

> Lars Huttar wrote:
>
>> Lars Huttar wrote:
>>
>>> Geert Josten wrote:
>>>
>>>> Hi,
>>>>
>>>>> Doesn't it? It allows you to specify the serializer. I've never 
>>>>> used it, but I've seen the code there. By default it uses the XML 
>>>>> serializer, you just need to specify another.
>>>>>
>>>>> Am I missing something?
>>>>>
>>>>> Regards, Upayavira
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Hmmm it _is_ possible with the SourceWritingTransformer, but only 
>>>> because XSL-FO is XML and there is a serializer that can convert 
>>>> the FO XML to PDF, which can be directly written to disk by this 
>>>> transformer.
>>>>
>>>> But what if you want to write something that isn't derived from 
>>>> XML? You can't just insert binary data into the <source:fragment> 
>>>> element and make it be written to some file...
>>>
>>>
>>>
>>>
>>>
>>> Actually you can; I have been doing that for some time (see my post 
>>> of today, "how to copy a binary file"). I wrap a <dummy> element 
>>> around the file contents.
>>
>>
>>
>> I should add that I also use serializer="text". In short, the input to
>> the transformer looks like:
>> <source:write (namespace declarations) serializer="text">
>>
>> <source:source>context:/mount/gem3/enterprise/sMicrosoft/format/gem.ico</source:source> 
>>
>>  <source:fragment><dummy>&#0;&#0;&#1;...</dummy></source:fragment>
>> </source:write>
>>

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


Re: writing PDF file to filesystem

Posted by Geert Josten <Ge...@daidalos.nl>.
Not the quickest solution I guess...

:-P

Lars Huttar wrote:

> Lars Huttar wrote:
> 
>> Geert Josten wrote:
>>
>>> Hi,
>>>
>>>> Doesn't it? It allows you to specify the serializer. I've never used 
>>>> it, but I've seen the code there. By default it uses the XML 
>>>> serializer, you just need to specify another.
>>>>
>>>> Am I missing something?
>>>>
>>>> Regards, Upayavira
>>>
>>>
>>>
>>>
>>> Hmmm it _is_ possible with the SourceWritingTransformer, but only 
>>> because XSL-FO is XML and there is a serializer that can convert the 
>>> FO XML to PDF, which can be directly written to disk by this 
>>> transformer.
>>>
>>> But what if you want to write something that isn't derived from XML? 
>>> You can't just insert binary data into the <source:fragment> element 
>>> and make it be written to some file...
>>
>>
>>
>>
>> Actually you can; I have been doing that for some time (see my post of 
>> today, "how to copy a binary file"). I wrap a <dummy> element around 
>> the file contents.
> 
> 
> I should add that I also use serializer="text". In short, the input to
> the transformer looks like:
> <source:write (namespace declarations) serializer="text">
> 
> <source:source>context:/mount/gem3/enterprise/sMicrosoft/format/gem.ico</source:source> 
> 
>  <source:fragment><dummy>&#0;&#0;&#1;...</dummy></source:fragment>
> </source:write>
> 
>> It may not be legal XML if it contains non-Unicode characters, but it 
>> works.
>> It's not pretty though...
>>
>> Lars
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
> 

-- 
Geert.Josten@Daidalos.nl
IT-consultant at Daidalos BV, Zoetermeer (NL)

http://www.daidalos.nl/
tel:+31-(0)79-3316961
fax:+31-(0)79-3316464

GPG: 1024D/12DEBB50

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


Re: writing PDF file to filesystem

Posted by Lars Huttar <la...@sil.org>.
Lars Huttar wrote:

> Geert Josten wrote:
>
>> Hi,
>>
>>> Doesn't it? It allows you to specify the serializer. I've never used 
>>> it, but I've seen the code there. By default it uses the XML 
>>> serializer, you just need to specify another.
>>>
>>> Am I missing something?
>>>
>>> Regards, Upayavira
>>
>>
>>
>> Hmmm it _is_ possible with the SourceWritingTransformer, but only 
>> because XSL-FO is XML and there is a serializer that can convert the 
>> FO XML to PDF, which can be directly written to disk by this 
>> transformer.
>>
>> But what if you want to write something that isn't derived from XML? 
>> You can't just insert binary data into the <source:fragment> element 
>> and make it be written to some file...
>
>
>
> Actually you can; I have been doing that for some time (see my post of 
> today, "how to copy a binary file"). I wrap a <dummy> element around 
> the file contents.

I should add that I also use serializer="text". In short, the input to
the transformer looks like:
<source:write (namespace declarations) serializer="text">

<source:source>context:/mount/gem3/enterprise/sMicrosoft/format/gem.ico</source:source>
  <source:fragment><dummy>&#0;&#0;&#1;...</dummy></source:fragment>
</source:write>

> It may not be legal XML if it contains non-Unicode characters, but it 
> works.
> It's not pretty though...
>
> Lars



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


Re: writing PDF file to filesystem

Posted by Lars Huttar <la...@sil.org>.
Geert Josten wrote:

> Hi,
>
>> Doesn't it? It allows you to specify the serializer. I've never used 
>> it, but I've seen the code there. By default it uses the XML 
>> serializer, you just need to specify another.
>>
>> Am I missing something?
>>
>> Regards, Upayavira
>
>
> Hmmm it _is_ possible with the SourceWritingTransformer, but only 
> because XSL-FO is XML and there is a serializer that can convert the 
> FO XML to PDF, which can be directly written to disk by this transformer.
>
> But what if you want to write something that isn't derived from XML? 
> You can't just insert binary data into the <source:fragment> element 
> and make it be written to some file...


Actually you can; I have been doing that for some time (see my post of 
today, "how to copy a binary file"). I wrap a <dummy> element around the 
file contents.
It may not be legal XML if it contains non-Unicode characters, but it works.
It's not pretty though...

Lars


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


Re: writing PDF file to filesystem

Posted by Geert Josten <Ge...@daidalos.nl>.
Hi,

> Doesn't it? It allows you to specify the serializer. I've never used it, 
> but I've seen the code there. By default it uses the XML serializer, you 
> just need to specify another.
> 
> Am I missing something?
> 
> Regards, Upayavira

Hmmm it _is_ possible with the SourceWritingTransformer, but only because XSL-FO is XML and there is 
a serializer that can convert the FO XML to PDF, which can be directly written to disk by this 
transformer.

But what if you want to write something that isn't derived from XML? You can't just insert binary 
data into the <source:fragment> element and make it be written to some file...

Cheers

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


Re: writing PDF file to filesystem

Posted by Upayavira <uv...@upaya.co.uk>.
Geert Josten wrote:
> Hi,
> 
> I would suggest using a source writing transformer. Unfortunatily does 
> the SourceWritingTransformer not support writing of non-xml stream. 

Doesn't it? It allows you to specify the serializer. I've never used it, 
but I've seen the code there. By default it uses the XML serializer, you 
just need to specify another.

Am I missing something?

Regards, Upayavira

 > It
> shouldn't be hard to patch it to make it work. I wrote a 
> SaveFilesTransformer myself that does the trick.
> 
> Cheers
> 
> Alex Kachanov wrote:
> 
>> Hi!
>>
>> I'm using Cocoon to convert docbook xml files to html and pdf
>>
>> HTML files are created chunked and are put into a directory so they 
>> would be avalable to the web-site isitors without any further 
>> on-the-fly conversion by Cocoon
>>
>> I managed to run "cocoon cron" component which makes html conversions 
>> at certain regular intervals that result in html files
>>
>> I would like to do the same with PDF files. However fo2pdf serializer 
>> just puts the converted PDF file to cache while I just need to dump 
>> the serialization to a specific folder.
>> Any ideas? Am I missing smth?
>>
>> p.s. Yes I know about CLI but any other suggestions?
>>
>> -------------------------------------
>> with best wishes
>> Alex Kachanov
> 
> 


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


Re: writing PDF file to filesystem

Posted by Alex Kachanov <al...@kachanov.com>.
Hi!!!

Just solved the problem with good help from Vadim Gritsenko and maillist-archive

No troubles with sourceWriteTransformer
The solution is elegant and smooth
It uses flowscript

I wrote a wiki article on that.
http://wiki.apache.org/cocoon/SavingFilesToFileSystem

Any questions are welcome.
-------------------------------------
with best wishes
Alex Kachanov

Re: writing PDF file to filesystem

Posted by Geert Josten <Ge...@daidalos.nl>.
Hi,

I would suggest using a source writing transformer. Unfortunatily does the SourceWritingTransformer 
not support writing of non-xml stream. It shouldn't be hard to patch it to make it work. I wrote a 
SaveFilesTransformer myself that does the trick.

Cheers

Alex Kachanov wrote:

> Hi!
> 
> I'm using Cocoon to convert docbook xml files to html and pdf
> 
> HTML files are created chunked and are put into a directory 
> so they would be avalable to the web-site isitors without any 
> further on-the-fly conversion by Cocoon
> 
> I managed to run "cocoon cron" component which makes html 
> conversions at certain regular intervals that result in html files
> 
> I would like to do the same with PDF files. However fo2pdf 
> serializer just puts the converted PDF file to cache while I just need 
> to dump the serialization to a specific folder. 
> 
> Any ideas? Am I missing smth?
> 
> p.s. Yes I know about CLI but any other suggestions?
> 
> -------------------------------------
> with best wishes
> Alex Kachanov

-- 
Geert.Josten@Daidalos.nl
IT-consultant at Daidalos BV, Zoetermeer (NL)

http://www.daidalos.nl/
tel:+31-(0)79-3316961
fax:+31-(0)79-3316464

GPG: 1024D/12DEBB50

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


Re: writing PDF file to filesystem

Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Feb 24, 2005, at 4:53 AM, Aurélien DEHAY wrote:

> I _think_ you can do it with flowscript, using processPipelineTo (see 
> doc http://cocoon.apache.org/2.1/userdocs/flow/api.html#Cocoon+Object 
> ).
>

That's right, you can... that's how I've always done it.

cheers,
—ml—


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


Re: writing PDF file to filesystem

Posted by Aurélien DEHAY <ad...@zorel.org>.
Hello

Markus Vaterlaus wrote:
> Hello Alex, hi list,
> 
> I had a similar problem. I had an application which contains a lot of
> xml files which are published in different channels like xml, html and
> pdf. I solved the problem by using a bit of UNIX scripting and wget.
> In cocoon I defined a couple of pages which contain links to the used
> files in question. these pages serve as the starting points for wget.
> 
> Although, I know that there is a cron compo in cocoon, I never used it. 
> 
> Markus

I _think_ you can do it with flowscript, using processPipelineTo (see 
doc http://cocoon.apache.org/2.1/userdocs/flow/api.html#Cocoon+Object ).

You can specify a java.io.OutputStream for the output of the pipeline, 
It may be a solution.


Rgds.
-- 
Aurélien

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


Re: writing PDF file to filesystem

Posted by Alex Kachanov <al...@kachanov.com>.
Hi, guys!

Just solved the problem with good help from Vadim Gritsenko and maillist-archive
No troubles with sourceWriteTransformer
The solution is elegant and smooth
It uses flowscript
Right now it's too late in Tokyo so I will post detailed explananion tomorrow

-------------------------------------
with best wishes
Alex Kachanov

Re: writing PDF file to filesystem

Posted by Geert Josten <Ge...@daidalos.nl>.
Hi,

> Hello Alex, hi list,
> 
> I had a similar problem. I had an application which contains a lot of
> xml files which are published in different channels like xml, html and
> pdf. I solved the problem by using a bit of UNIX scripting and wget.
> In cocoon I defined a couple of pages which contain links to the used
> files in question. these pages serve as the starting points for wget.
> 
> Although, I know that there is a cron compo in cocoon, I never used it. 
> 
> Markus

Generate the list with a directory generator (watch with caching!), XSL transform the list to save: 
instructions, making the files direct to cocoon pipes, save transfrom the list, serialize a report.

or

Generate the list with a directory generator (watch with caching!), XSL transform the list to 
source: and include: instructions, include the xsl-fo stuff, sourcewrite transfrom the list, 
serialize a report.

Though, I think the latter solution might be a bad approach, considering large or many xsl-fo 
documents... unless the streaming concept prevents a lot of caching...

Cheers

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


Re: writing PDF file to filesystem

Posted by Markus Vaterlaus <mv...@gmail.com>.
Hello Alex, hi list,

I had a similar problem. I had an application which contains a lot of
xml files which are published in different channels like xml, html and
pdf. I solved the problem by using a bit of UNIX scripting and wget.
In cocoon I defined a couple of pages which contain links to the used
files in question. these pages serve as the starting points for wget.

Although, I know that there is a cron compo in cocoon, I never used it. 

Markus



On Thu, 24 Feb 2005 17:13:41 +0900, Alex Kachanov <al...@kachanov.com> wrote:
> Hi!
> 
> I'm using Cocoon to convert docbook xml files to html and pdf
> 
> HTML files are created chunked and are put into a directory
> so they would be avalable to the web-site isitors without any
> further on-the-fly conversion by Cocoon
> 
> I managed to run "cocoon cron" component which makes html
> conversions at certain regular intervals that result in html files
> 
> I would like to do the same with PDF files. However fo2pdf
> serializer just puts the converted PDF file to cache while I just need
> to dump the serialization to a specific folder.
> 
> Any ideas? Am I missing smth?
> 
> p.s. Yes I know about CLI but any other suggestions?
> 
> -------------------------------------
> with best wishes
> Alex Kachanov

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