You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Christian Kreutz <sc...@gmx.de> on 2004/02/21 02:18:08 UTC
Default Publication with PDF
Hi list,
I wanted to offer the possibility to transform
xhtml files in pdf for the default publication.
Thanks to the antenna house I could solve this
task very fast.
On that page you can find a zip archive with
a comprehensive XSL-FO file: xhtml2fo.xsl
http://www.antennahouse.com/XSLsample/XSLsample.htm
which i put to default/xslt directory.
It offers the transformation of all important xhtml tags
to xsl-fo and is easily changeable. On top to it has
the title as page header and the number of pages included.
I included this to the public-sitemap.xmap:
<map:match pattern="**.pdf">
<map:generate src="content/{1}/index_de.xml"/>
<map:transform src="xslt/doc2pdf.xsl"/>
<map:serialize type="fo2pdf"/>
</map:match>
and the result is a generated pdf file by just change
the html to pdf in the browser url.
I love Cocoon and Lenya!!! :-)
Good Night
Christian
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org
Re: Default Publication with PDF
Posted by Michael Wechner <mi...@wyona.com>.
Christian Kreutz wrote:
>Hi list,
>
>I wanted to offer the possibility to transform
>xhtml files in pdf for the default publication.
>Thanks to the antenna house I could solve this
>task very fast.
>
>
cool. Can you add an entry to Bugzilla (or have you already done so)?
>
>I love Cocoon and Lenya!!! :-)
>
>
:-)
Michi
>Good Night
>
>Christian
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: lenya-user-help@cocoon.apache.org
>
>
>
>
--
Michael Wechner
Wyona Inc. - Open Source Content Management - Apache Lenya
http://www.wyona.com http://cocoon.apache.org/lenya/
michael.wechner@wyona.com michi@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org
RE: Default Publication with PDF
Posted by Ethan Schroeder <et...@netnet.net>.
I can't get it to work at all. Acroread gives an error about no pages
in the pdf document. Too bad. This would have been cool.
Ethan
-----Original Message-----
From: Manuel Siebeneicher [mailto:trashing@gmx.net]
Sent: Monday, March 08, 2004 7:13 AM
To: Lenya Users List
Subject: Re: Default Publication with PDF
Hi Christian,
have you ever test it with tables? I tried it with several tables, but I
only
get an empty pdf. I don't know why. Perhaps you can help?
greetz
Manuel
Am Samstag, 21. Februar 2004 02:18 schrieb Christian Kreutz:
> Hi list,
>
> I wanted to offer the possibility to transform
> xhtml files in pdf for the default publication.
> Thanks to the antenna house I could solve this
> task very fast.
> On that page you can find a zip archive with
> a comprehensive XSL-FO file: xhtml2fo.xsl
> http://www.antennahouse.com/XSLsample/XSLsample.htm
> which i put to default/xslt directory.
> It offers the transformation of all important xhtml tags
> to xsl-fo and is easily changeable. On top to it has
> the title as page header and the number of pages included.
>
> I included this to the public-sitemap.xmap:
>
> <map:match pattern="**.pdf">
> <map:generate src="content/{1}/index_de.xml"/>
> <map:transform src="xslt/doc2pdf.xsl"/>
> <map:serialize type="fo2pdf"/>
> </map:match>
>
> and the result is a generated pdf file by just change
> the html to pdf in the browser url.
>
> I love Cocoon and Lenya!!! :-)
>
> Good Night
>
> Christian
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: lenya-user-help@cocoon.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org
Re: Default Publication with PDF
Posted by Manuel Siebeneicher <tr...@gmx.net>.
Hi Christian,
have you ever test it with tables? I tried it with several tables, but I only
get an empty pdf. I don't know why. Perhaps you can help?
greetz
Manuel
Am Samstag, 21. Februar 2004 02:18 schrieb Christian Kreutz:
> Hi list,
>
> I wanted to offer the possibility to transform
> xhtml files in pdf for the default publication.
> Thanks to the antenna house I could solve this
> task very fast.
> On that page you can find a zip archive with
> a comprehensive XSL-FO file: xhtml2fo.xsl
> http://www.antennahouse.com/XSLsample/XSLsample.htm
> which i put to default/xslt directory.
> It offers the transformation of all important xhtml tags
> to xsl-fo and is easily changeable. On top to it has
> the title as page header and the number of pages included.
>
> I included this to the public-sitemap.xmap:
>
> <map:match pattern="**.pdf">
> <map:generate src="content/{1}/index_de.xml"/>
> <map:transform src="xslt/doc2pdf.xsl"/>
> <map:serialize type="fo2pdf"/>
> </map:match>
>
> and the result is a generated pdf file by just change
> the html to pdf in the browser url.
>
> I love Cocoon and Lenya!!! :-)
>
> Good Night
>
> Christian
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: lenya-user-help@cocoon.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org
Re: AW: Default Publication with PDF
Posted by Wolfgang Weigel <wo...@web.de>.
Christian Kreutz <schreibchris <at> gmx.de> writes:
>
> > Wolfgang Weigel wrote:
> >
> > [...]
> > > I tried to do the same described above. I installed the stylesheet and I
> > also
> > > modified the publication-sitemap.xmap with the following lines:
> > >
> > > <map:match pattern="**.pdf">
> > > <map:generate src="content/{1}/index_en.xml"/>
> > > <map:transform src="xslt/xhtml2fo.xsl"/>
> > > <map:serialize type="fo2pdf"/>
> > > </map:match>
> > >
> > > When I try get a result via a Webbrowser like Opera/Mozilla (on a
> > Linux-Box) the
> > > PlugIn starts but all I get is a black screen or a comment like:
> > >
> > > There was an error opening this document. A file read error has
> > occurred.
> >
> > Are you sure that your stylesheet matches correctly?
> >
> > -- Andreas
>
> I tried it with different browser and it worked without a problem.
> Anyway as it is server side the browser should not be the problem, or?
>
> The stylsheet definitely needs some further changes. For example the
> <strong> and <b> tags
> are wrong translated to bolder. It has to be bold.
> Image and table integration doesn't work
7)
for me either but I am working on
> that.
7)
>
The only difference I can find is that I am using not the default-application. I
use a new application based on the default.
I can generate a pdf from the index_en.xml and the downloaded stylesheet via fop
doing it on the commandline without any problems:
fop -xml ... -xsl ... -pdf ...
I noticed that jetty throws an exception every time I call a pdf. Maybe this can
solve the problem. Unfortunally I can not interpret this message:
06:58:29.313 WARN!! Error for /myApplication/live/Lehre.pdf
java.lang.AbstractMethodError
at org.apache.cocoon.components.pipeline.impl.
AbstractCachingProcessingPipeline.
generateCachingKey(AbstractCachingProcessingPipeline.java:369)
at org.apache.cocoon.components.pipeline.impl.
AbstractCachingProcessingPipeline.
setupPipeline(AbstractCachingProcessingPipeline.java:655)
at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.
preparePipeline(AbstractProcessingPipeline.java:508)
at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.
process(AbstractProcessingPipeline.java:470)
at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.
invoke(SerializeNode.java:147)
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org
Re: AW: Default Publication with PDF
Posted by Christian Kreutz <sc...@gmx.de>.
> Wolfgang Weigel wrote:
>
> [...]
> > I tried to do the same described above. I installed the stylesheet and I
> also
> > modified the publication-sitemap.xmap with the following lines:
> >
> > <map:match pattern="**.pdf">
> > <map:generate src="content/{1}/index_en.xml"/>
> > <map:transform src="xslt/xhtml2fo.xsl"/>
> > <map:serialize type="fo2pdf"/>
> > </map:match>
> >
> > When I try get a result via a Webbrowser like Opera/Mozilla (on a
> Linux-Box) the
> > PlugIn starts but all I get is a black screen or a comment like:
> >
> > There was an error opening this document. A file read error has
> occurred.
>
> Are you sure that your stylesheet matches correctly?
>
> -- Andreas
I tried it with different browser and it worked without a problem.
Anyway as it is server side the browser should not be the problem, or?
The stylsheet definitely needs some further changes. For example the
<strong> and <b> tags
are wrong translated to bolder. It has to be bold.
Image and table integration doesn't work for me either but I am working on
that.
Regards
Christian
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: lenya-user-help@cocoon.apache.org
>
--
GMX ProMail (250 MB Mailbox, 50 FreeSMS, Virenschutz, 2,99 EUR/Monat...)
jetzt 3 Monate GRATIS + 3x DER SPIEGEL +++ http://www.gmx.net/derspiegel +++
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org
Re: AW: Default Publication with PDF
Posted by Andreas Hartmann <an...@apache.org>.
Wolfgang Weigel wrote:
[...]
> I tried to do the same described above. I installed the stylesheet and I also
> modified the publication-sitemap.xmap with the following lines:
>
> <map:match pattern="**.pdf">
> <map:generate src="content/{1}/index_en.xml"/>
> <map:transform src="xslt/xhtml2fo.xsl"/>
> <map:serialize type="fo2pdf"/>
> </map:match>
>
> When I try get a result via a Webbrowser like Opera/Mozilla (on a Linux-Box) the
> PlugIn starts but all I get is a black screen or a comment like:
>
> There was an error opening this document. A file read error has occurred.
Are you sure that your stylesheet matches correctly?
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org
Re: AW: Default Publication with PDF
Posted by Wolfgang Weigel <wo...@web.de>.
Christian Kreutz <schreibchris <at> gmx.de> writes:
>
> > -----Ursprüngliche Nachricht-----
> > Von: B.K. DeLong [mailto:bkdelong <at> pobox.com]
> > Gesendet: Samstag, 21. Februar 2004 16:54
> > An: Lenya Users List
> > Betreff: Re: Default Publication with PDF
> >
> >
> > At 02:18 AM 2/21/2004 +0100, you wrote:
> > >Hi list,
> > >
> > >I wanted to offer the possibility to transform
> > >xhtml files in pdf for the default publication.
> > >Thanks to the antenna house I could solve this
> > >task very fast.
> > >On that page you can find a zip archive with
> > >a comprehensive XSL-FO file: xhtml2fo.xsl
> > >http://www.antennahouse.com/XSLsample/XSLsample.htm
> > > which i put to default/xslt directory.
> > >It offers the transformation of all important xhtml tags
> > >to xsl-fo and is easily changeable. On top to it has
> > >the title as page header and the number of pages included.
> > >
> > >I included this to the public-sitemap.xmap:
> > >
> > > <map:match pattern="**.pdf">
> > > <map:generate src="content/{1}/index_de.xml"/>
> > > <map:transform src="xslt/doc2pdf.xsl"/>
> > > <map:serialize type="fo2pdf"/>
> > > </map:match>
> > >
Hi!
I tried to do the same described above. I installed the stylesheet and I also
modified the publication-sitemap.xmap with the following lines:
<map:match pattern="**.pdf">
<map:generate src="content/{1}/index_en.xml"/>
<map:transform src="xslt/xhtml2fo.xsl"/>
<map:serialize type="fo2pdf"/>
</map:match>
When I try get a result via a Webbrowser like Opera/Mozilla (on a Linux-Box) the
PlugIn starts but all I get is a black screen or a comment like:
There was an error opening this document. A file read error has occurred.
Has anybody had the same experience? Can anybody help?
I also want to put some pictures in the pdf. Does this work?
bye for now
Wolfgang
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org
AW: Default Publication with PDF
Posted by Christian Kreutz <sc...@gmx.de>.
> -----Ursprüngliche Nachricht-----
> Von: B.K. DeLong [mailto:bkdelong@pobox.com]
> Gesendet: Samstag, 21. Februar 2004 16:54
> An: Lenya Users List
> Betreff: Re: Default Publication with PDF
>
>
> At 02:18 AM 2/21/2004 +0100, you wrote:
> >Hi list,
> >
> >I wanted to offer the possibility to transform
> >xhtml files in pdf for the default publication.
> >Thanks to the antenna house I could solve this
> >task very fast.
> >On that page you can find a zip archive with
> >a comprehensive XSL-FO file: xhtml2fo.xsl
> >http://www.antennahouse.com/XSLsample/XSLsample.htm
> > which i put to default/xslt directory.
> >It offers the transformation of all important xhtml tags
> >to xsl-fo and is easily changeable. On top to it has
> >the title as page header and the number of pages included.
> >
> >I included this to the public-sitemap.xmap:
> >
> > <map:match pattern="**.pdf">
> > <map:generate src="content/{1}/index_de.xml"/>
> > <map:transform src="xslt/doc2pdf.xsl"/>
> > <map:serialize type="fo2pdf"/>
> > </map:match>
> >
> >and the result is a generated pdf file by just change
> >the html to pdf in the browser url.
>
> But the question is, to what degree of customization can we
> do? Can we have
> it add tags to the document ala Acrobat 6? And allow for the
> "Fast Web
> View" feature as well as use PDF Optimizer? Or is it just a
> generic PDF?
I changed a lot of styles i.e. for p, links and other things which
worked fine. On top of that I don't know because I am still
experimenting with it. It seems quite comprehensive but new
features like "Fast web view" might not be included.
When I have implemented and tested it further I will
tell more about it.
>
>
> --
> B.K. DeLong
> bkdelong@pobox.com
> +1.617.797.2472
>
http://ocw.mit.edu Work.
http://www.brain-stream.com Play.
http://www.the-leaky-cauldron.org Potter.
http://www.city-of-doors.com Sigil.
http://www.hackerfoundation.org Future.
PGP Fingerprint:
38D4 D4D4 5819 8667 DFD5 A62D AF61 15FF 297D 67FE
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org
Re: Default Publication with PDF
Posted by "B.K. DeLong" <bk...@pobox.com>.
At 02:18 AM 2/21/2004 +0100, you wrote:
>Hi list,
>
>I wanted to offer the possibility to transform
>xhtml files in pdf for the default publication.
>Thanks to the antenna house I could solve this
>task very fast.
>On that page you can find a zip archive with
>a comprehensive XSL-FO file: xhtml2fo.xsl
>http://www.antennahouse.com/XSLsample/XSLsample.htm
> which i put to default/xslt directory.
>It offers the transformation of all important xhtml tags
>to xsl-fo and is easily changeable. On top to it has
>the title as page header and the number of pages included.
>
>I included this to the public-sitemap.xmap:
>
> <map:match pattern="**.pdf">
> <map:generate src="content/{1}/index_de.xml"/>
> <map:transform src="xslt/doc2pdf.xsl"/>
> <map:serialize type="fo2pdf"/>
> </map:match>
>
>and the result is a generated pdf file by just change
>the html to pdf in the browser url.
But the question is, to what degree of customization can we do? Can we have
it add tags to the document ala Acrobat 6? And allow for the "Fast Web
View" feature as well as use PDF Optimizer? Or is it just a generic PDF?
--
B.K. DeLong
bkdelong@pobox.com
+1.617.797.2472
http://ocw.mit.edu Work.
http://www.brain-stream.com Play.
http://www.the-leaky-cauldron.org Potter.
http://www.city-of-doors.com Sigil.
http://www.hackerfoundation.org Future.
PGP Fingerprint:
38D4 D4D4 5819 8667 DFD5 A62D AF61 15FF 297D 67FE
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org