cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject AW: Antwort: Saving the Outputstream
Date Wed, 14 Sep 2005 11:25:55 GMT
Yes offcause I cant do this :)
But some things have changed. Insted of using a Reader I extandet the fo2pdf

package swl.test.cocoon.serialization; 


import org.apache.cocoon.serialization.FOPSerializer; 
import org.xml.sax.SAXException; 

public class Swlfo2pdf extends FOPSerializer { 

   public void endDocument(){ 
      try { 
         FileOutputStream myout = new FileOutputStream("c:/temp/myout.pdf");

      } catch (SAXException e) { 
         // TODO Auto-generated catch block 
      } catch (FileNotFoundException e) { 
         // TODO Auto-generated catch block 

The serializer Swlfo2pdf runs great. I m getting the requestet dokument with
it, plus an empty file c:/temp/myout.pdf. But offcause this is'nt all I
need. Instead of an empty document I want to get a identical copy of the
FOPSerializer's output on a servers directory of my choise). But so far I've
no Idea how this is suposed to work :(
my xmap:
<map:sitemap xmlns:map="
<> ">
    <!-- =========================== components
=================================== -->
        <map:transformers default="xslt">
            <map:transformer name="xslt-saxon" pool-grow="2" pool-max="32"
pool-min="8" src="org.apache.cocoon.transformation.TraxTransformer">
        <map:serializers default="html">
            <map:serializer name="fo2pdf"
            <map:serializer name="Swlfo2pdf"
src="swl.test.cocoon.serialization.Swlfo2pdf" mime-type="application/pdf"/>
    <!-- =========================== Views
=================================== -->
        <map:view name="content" from-label="content">
            <map:serialize type="xml"/>
        <map:view name="links" from-position="last">
            <map:serialize type="links"/>
        <!-- =========================== Pipelines
================================= -->
            <!-- PDF Pipeline -->
            <map:match pattern="*/*/*.pdf">
<file://c:/worknt/hausn/xbefund/xml/{1}/{3}.xml> >
                <map:transform type="xslt-saxon"
<file://c:/worknt/hausn/xbefund/stylesheets/{1}/{2}.xsl> >
                <map:serialize type="Swlfo2pdf"/>
Thanks, Jan


Von: [] 
Gesendet: Mittwoch, 14. September 2005 11:00
Cc: '';
Betreff: Antwort: Saving the Outputstream


Could you provide (copy/paste) the reader source and sitemap.xmap extract
which you are using? 

Seems as if the attachment is broken. I suggest not to attach files to the
mailing list. 

Holger schrieb
am 13.09.2005 16:04:36:

> Hello List,
> I m creating PDF Files using cocoons fo2pdf serializer. Everything works
> fine. Now I want to save the created pdf file on a servers directory. I
> wrote a Reader to get access to the outputstream in order to save it. The
> directory name is dependent on the transferred xml files name. To to this
> wrote my own Reader. Sadly closely nothing happens when I try to save the
> outputstream.
> In Addition my Reader sources and my xconf.
> Can anyone please help me? Thanks!
> [Anhang "src.rar" gelöscht von Holger Willenborg/Muenster/Armacell] 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message