Yes offcause I cant do this :)
 
But some things have changed. Insted of using a Reader I extandet the fo2pdf Serializer.

package swl.test.cocoon.serialization;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;

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

public class Swlfo2pdf extends FOPSerializer {
   

   public void endDocument(){
      try {
         super.endDocument();
         FileOutputStream myout = new FileOutputStream("c:/temp/myout.pdf");
      } catch (SAXException e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
      } catch (FileNotFoundException e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
      }
   }
}
 
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="http://apache.org/cocoon/sitemap/1.0">
    <!-- =========================== components =================================== -->
    <map:components>
        <map:transformers default="xslt">
            <map:transformer name="xslt-saxon" pool-grow="2" pool-max="32" pool-min="8" src="">
                <use-request-parameters>false</use-request-parameters>
                <use-browser-capabilities-db>false</use-browser-capabilities-db>
                <xslt-processor-role>saxon</xslt-processor-role>
            </map:transformer>
        </map:transformers>
        <map:serializers default="html">
            <map:serializer name="fo2pdf" src="" mime-type="application/pdf"/>
            <map:serializer name="Swlfo2pdf" src="" mime-type="application/pdf"/>
        </map:serializers>
    </map:components>
    <!-- =========================== Views =================================== -->
    <map:views>
        <map:view name="content" from-label="content">
            <map:serialize type="xml"/>
        </map:view>
        <map:view name="links" from-position="last">
            <map:serialize type="links"/>
        </map:view>
    </map:views>
    <map:pipelines>
        <!-- =========================== Pipelines ================================= -->
        <map:pipeline>
            <!-- PDF Pipeline -->
            <map:match pattern="*/*/*.pdf">
                <map:generate src=""file:///c:/worknt/hausn/xbefund/xml/%7B1%7D/%7B3%7D.xml%22/">file://c:/worknt/hausn/xbefund/xml/{1}/{3}.xml"/>
                <map:transform type="xslt-saxon" src=""file:///c:/worknt/hausn/xbefund/stylesheets/%7B1%7D/%7B2%7D.xsl%22/">file://c:/worknt/hausn/xbefund/stylesheets/{1}/{2}.xsl"/>
                <map:serialize type="Swlfo2pdf"/>
            </map:match>
        </map:pipeline>
    </map:pipelines>
</map:sitemap>
 
 
Thanks, Jan
-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 14. September 2005 11:00
An: users@cocoon.apache.org
Cc: 'users@cocoon.apache.org'; [EMAIL PROTECTED]
Betreff: Antwort: Saving the Outputstream


Hi,

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.

Regards
Holger

[EMAIL PROTECTED] 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 I
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to