cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerritjan Koekkoek <gerritjankoekk...@mac.com>
Subject Re: First steps with PDF generation
Date Mon, 04 Feb 2008 14:42:14 GMT
  <?xml version="1.0" encoding="ISO-8859-1"?><!--
   Copyright 1999-2004 The Apache Software Foundation

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or  
implied.
   See the License for the specific language governing permissions and
   limitations under the License.
--><fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
   <fo:layout-master-set>
     <!-- layout for all pages -->
     <fo:simple-page-master master-name="main" page-height="12cm" page- 
width="20cm" margin-top="2cm" margin-bottom="2cm" margin-left="2cm"  
margin-right="2cm">
       <fo:region-body margin-top="0cm"/>
       <fo:region-before extent="0cm"/>
       <fo:region-after extent="0cm"/>
     </fo:simple-page-master>
   </fo:layout-master-set>

   <!-- content -->
   <fo:page-sequence master-reference="main">
     <fo:flow flow-name="xsl-region-body">
       <fo:block padding="24pt">
         <fo:external-graphic src="/usr/local/apache-tomcat/webapps/ 
cocoon//resources/images/cocoon.gif"/>
       </fo:block>
       <fo:block font-size="18pt">
         Congratulations!
       </fo:block>
       <fo:block font-size="12pt">
         If you see this text in a PDF document, it means that Cocoon  
and FOP
         were able to generate it from the minimal.fo.xml example  
document. If
         you see additionally an image above, it means that even Batik  
and the
         resolving of the image path works!
       </fo:block>
     </fo:flow>
   </fo:page-sequence>
</fo:root>
On 4 feb 2008, at 15:28, Alessandro Vincelli wrote:

> I think the problem is in minimal.fo.xml.
> Can you post the content of:  minimal.fo.xml
>
>
> Gerritjan Koekkoek ha scritto:
>> Hi,
>>
>> I'm trying to startup with PDF generation...
>> So far...
>> added in sitemap two sections:
>>    <map:serializer name="fo2pdf"
>>      src="org.apache.cocoon.serialization.FOPSerializer"
>>      mime-type="application/pdf"  
>> logger="sitemap.serializer.fo2pdf"> </map:serializer>
>> and
>>      <map:match pattern="test.pdf">
>>        <map:generate src="style/xsl2/minimal.fo.xml" type="file"/>
>>        <map:serialize type="fo2pdf"/>
>>      </map:match>
>> and minimal.fo.xml is the same as found in the /samples/blocks/fop/  
>> in the cocoon distribution
>>
>> When in browser asking for test.pdf
>> following error:
>>
>> org.xml.sax.SAXParseException: The processing instruction target  
>> matching "[xX][mM][lL]" is not allowed.
>> context://test.cdls-nl.org/style/xsl2/minimal.fo.xml - 1:7
>>
>> Cocoon stacktrace[hide]
>>
>> The processing instruction target matching "[xX][mM][lL]" is not  
>> allowed.
>> context://test.cdls-nl.org/style/xsl2/minimal.fo.xml - 1:7
>>
>> Failed to process pipeline
>> context://test.cdls-nl.org/style/xsl2/minimal.fo.xml - 1:7
>> [SAXParseException]
>> context://test.cdls-nl.org/sitemap.xmap - 398:39
>> <map:serialize type="fo2pdf">
>> context://test.cdls-nl.org/sitemap.xmap - 397:68
>> <map:generate type="file">
>> context://sitemap.xmap - 952:66
>> <map:mount>
>>
>> As a really newbie on PDF generation any suggestions
>>
>> Gerritjan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message