You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ines Robbers <ro...@comprehend.de> on 2002/12/30 14:24:14 UTC
PDF problem
Hi there,
I'm running Cocoon 2.0.4 on Windows XP.
At the moment I'm trying out the examples from the book "Cocoon:
Building XML Applications" by M. Langham & C. Ziegler. Some of them
work, others don't even though I've copied them from CD.
In case of PDF-creation, for instance, Acrobat is loading but then a
window pops up saying: "The file is damaged and could not be repaired".
(Acrobat itself is working fine with other pdf)
This is the Sitemap fragment:
<map:pipeline>
<map:match pattern="myfirstpdf">
<map:generate src="myfirstpdf.xml"/>
<map:transform src="myfirstpdf.xsl"/>
<map:serialize type="fo2pdf"/>
</map:match>
</map:pipeline>
This is the XML:
<?xml version="1.0"?>
<data>
<name>Ines</name>
</data>
And the XSL:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="page"
page-height="29.7cm"
page-width="21cm"
margin-top="1cm"
margin-bottom="2cm"
margin-left="2.5cm"
margin-right="2.5cm">
<fo:region-before extent="3cm"/>
<fo:region-body margin-top="3cm"/>
<fo:region-after extent="1.5cm"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="all">
<fo:repeatable-page-master-alternatives>
<fo:conditional-page-master-reference master-name="page"
page-position="first"/>
</fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-name="all">
<fo:flow flow-name="xsl-region-body">
<xsl:apply-templates/>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="data">
<fo:block font-size="36pt" space-before.optimum="24pt"
text-align="center"><xsl:value-of select="name"/></fo:block>
</xsl:template>
</xsl:stylesheet>
I've also tried it with different filenames in different folders but
it's always the same error message.
Anyone got an idea?
Many thanks for help!
Ines
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>