cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ricardo Borillo" <bori...@gmail.com>
Subject Re: FOPSerializer question
Date Thu, 23 Nov 2006 18:14:57 GMT
It Works!! Thank you Geert.

I attach an example performing a digital signature over a PDF using iText.

Your sitemap.xmap must have the new serializer defined:

<map:serializer logger="sitemap.serializer.fo2spdf"
mime-type="application/pdf"
                        name="fo2spdf" src="
org.apache.cocoon.serialization.PDFSignSerializer"/>


And you need a new "match" using this serializer:

        <map:match pattern="kk">
            <map:generate src="samples/hello-world/content/hello.xml" />
            <map:transform src="samples/hello-world/style/xsl/page2fo.xsl"
/>
            <map:serialize type="fo2spdf" />
        </map:match>

Hope it helps :)

-- 
Salut,
====================================
Ricardo Borillo Domenech
Analista/Programador - Servei d'Informàtica
Universitat Jaume I
http://xml-utils.com



On 11/17/06, Ricardo Borillo <borillo@gmail.com> wrote:
>
> Thank's for the tip. I will give it a try ...
>
> On 11/16/06, Geert Josten <geert.josten@daidalos.nl> wrote:
> >
> > A not very nice, but workable method is:
> >
> > - create a buffering output stream at setOutputStream(out) and pass that
> > to the super, while saving a reference to the output stream that is passed
> > as parameter for later.
> > - close and read the buffered output at endDocument(), passing it to
> > your signing library, dump the signed result to the real output stream.
> >
> > Kind regards,
> > Geert
> >
> > >
> >
> >
> > Drs. G.P.H. Josten
> > Consultant
> >
> >
> >
> > Daidalos BV
> > Source of Innovation
> > Hoekeindsehof 1-4
> > 2665  JZ  Bleiswijk
> > Tel.: +31 (0) 10 850 1200
> > Fax: +31 (0) 10 850 1199
> > www.daidalos.nl
> > KvK 27164984
> >
> >
> > De informatie - verzonden in of met dit emailbericht - is afkomstig van
> > Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit
> > bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan
> > dit bericht kunnen geen rechten worden ontleend.
> >
> >
> > > Van: Ricardo Borillo [mailto:borillo@gmail.com]
> > > Verzonden: donderdag 16 november 2006 19:28
> > > Aan: dev@cocoon.apache.org
> > > Onderwerp: FOPSerializer question
> > >
> > > Hi all!!
> > >
> > > I want to generate a PDF with a digital signature. I have
> > > found a Java example that do the work:
> > > http://itextpdf.sourceforge.net/howtosign.html#howtosign
> > >
> > > How can i integrate this with Cocoon?
> > > I have worked with custom generators, but never with serializers ...
> > >
> > > Thanks in advance
> > >
> > > --
> > > Salut,
> > > ====================================
> > > Ricardo Borillo Domenech
> > > Analista/Programador - Servei d'Informàtica Universitat Jaume
> > > I http://xml-utils.com
> > >
> >
>
>
>
> --
> Salut,
> ====================================
> Ricardo Borillo Domenech
> Analista/Programador - Servei d'Informàtica
> Universitat Jaume I
> http://xml-utils.com
>

Mime
View raw message