cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eduard Tibet <eduard.ti...@i-free.com>
Subject Re: FOPSerializer user config
Date Tue, 09 Nov 2010 08:37:59 GMT
Philippe,

First, I ask you to try your config file using standalone FOP (not in Cocoon). I suggest even
in standalone mode your config file doesn't load. The problem is that the config file for
FOP 0.9x slightly differs from the fop 0.2x.

But there are too many points with possible mistakes, so, step by step...

1. Try to output just fo file in standalone FOP mode. Are the names of the fonts inside fo
file are the same, as in your config? If yes - try the second step. If no - there are problems
in your XSL:FO stylesheet - it generates  the font names that are differs from the "font-triplet"
values from your config file. Try manually replace font values in fo by ones from the config
file and generate pdf. If success - you find the problem: xsl:fo stylesheets.

2. Try the following config file with standalone FOP. Don't forget to replace given fonts
names with the actual ones from your setup (better with absolute paths - they are better understand
by fop)! I noted that sometimes fop in cocoon (despite I use Cocoon 2.2) doesn't see the relative
paths to metrics/glyphs. If it is OK - try the following config file in Cocoon.

<?xml version="1.0"?>
<fop version="1.0">

  <!-- Source resolution in dpi (dots/pixels per inch) for determining the size of pixels
in SVG and bitmap images, default: 72dpi -->
  <source-resolution>72</source-resolution>
  <!-- Target resolution in dpi (dots/pixels per inch) for specifying the target resolution
for generated bitmaps, default: 72dpi -->
  <target-resolution>300</target-resolution>
  
  <!-- Strict user configuration -->
  <strict-configuration>true</strict-configuration>

  <!-- Strict FO validation -->
  <strict-validation>true</strict-validation>
  
  <!-- Default page-height and page-width, in case
       value is specified as auto -->
  <default-page-settings height="297mm" width="210mm"/>
  
  <!-- Information for specific renderers -->
  <!-- Uses renderer mime type for renderers -->
  <renderers>
    <renderer mime="application/pdf">
      <filterList>
        <!-- provides compression using zlib flate (default is on) -->
        <value>flate</value>
  
        <!-- encodes binary data into printable ascii characters (default off)
             This provides about a 4:5 expansion of data size -->
        <!-- <value>ascii-85</value> -->
  
        <!-- encodes binary data with hex representation (default off)
             This filter is not recommended as it doubles the data size -->
        <!-- <value>ascii-hex</value> -->
      </filterList>

      <fonts>
        <!-- embedded fonts -->
	<!-- Sans font group -->
 	<!-- Sans normal -->
  	<font metrics-url="fop-fonts-metrics/liberation-sans-regular.xml" kerning="yes" embed-url="fop-fonts-glyphs/liberation-sans-regular.ttf">
		<font-triplet name="sans-serif" style="normal" weight="normal"/>
		<font-triplet name="Symbol" style="normal" weight="normal"/>
		<font-triplet name="ZapfDingbats" style="normal" weight="normal"/>
	</font>
	
	<!-- Sans bold -->
	<font metrics-url="fop-fonts-metrics/liberation-sans-bold.xml" kerning="yes" embed-url="fop-fonts-glyphs/liberation-sans-bold.ttf">
		<font-triplet name="sans-serif" style="normal" weight="bold"/>
		<font-triplet name="Symbol" style="normal" weight="bold"/>
		<font-triplet name="ZapfDingbats" style="normal" weight="bold"/>
	
	</font>
	<!-- Sans italic -->
	<font metrics-url="fop-fonts-metrics/liberation-sans-italic.xml" kerning="yes" embed-url="fop-fonts-glyphs/liberation-sans-italic.ttf">
		<font-triplet name="sans-serif" style="italic" weight="normal"/>
		<font-triplet name="Symbol" style="italic" weight="normal"/>
		<font-triplet name="ZapfDingbats" style="italic" weight="normal"/>
	
	</font>
	<!-- Sans bold italic -->
	<font metrics-url="fop-fonts-metrics/liberation-sans-bold-italic.xml" kerning="yes" embed-url="fop-fonts-glyphs/liberation-sans-bold-italic.ttf">
		<font-triplet name="sans-serif" style="italic" weight="bold"/>
		<font-triplet name="Symbol" style="italic" weight="bold"/>
		<font-triplet name="ZapfDingbats" style="italic" weight="bold"/>
	
	</font>
	
 <!-- Serif font group -->
 	<!-- Serif normal -->
  	<font metrics-url="fop-fonts-metrics/charis-sil-regular.xml" kerning="yes" embed-url="fop-fonts-glyphs/charis-sil-regular.ttf">
		<font-triplet name="serif" style="normal" weight="normal"/>
	</font>
	<!-- Serif italic -->
	<font metrics-url="fop-fonts-metrics/charis-sil-italic.xml" kerning="yes" embed-url="fop-fonts-glyphs/charis-sil-italic.ttf">
		<font-triplet name="serif" style="italic" weight="normal"/>
	</font>
	<!-- Serif bold -->
	<font metrics-url="fop-fonts-metrics/charis-sil-bold.xml" kerning="yes" embed-url="fop-fonts-glyphs/charis-sil-bold.ttf">
		<font-triplet name="serif" style="normal" weight="bold"/>
	</font>
	<!-- Serif bold italic -->
	<font metrics-url="fop-fonts-metrics/charis-sil-bold-italic.xml" kerning="yes" embed-url="fop-fonts-glyphs/charis-sil-bold-italic.ttf">
		<font-triplet name="serif" style="italic" weight="bold"/>
	</font>

<!-- Monospace font group -->
	 
	<!-- Monospace normal -->
	<font metrics-url="fop-fonts-metrics/free-monospaced-regular.xml" kerning="yes" embed-url="fop-fonts-glyphs/free-monospaced-regular.ttf">
    		<font-triplet name="monospace" style="normal" weight="normal"/>
	</font>
	<!-- Monospace bold -->
	<font metrics-url="fop-fonts-metrics/free-monospaced-bold.xml" kerning="yes" embed-url="fop-fonts-glyphs/free-monospaced-bold.ttf">
		<font-triplet name="monospace" style="normal" weight="bold"/>
	</font>
	<!-- Monospace italic -->
	<font metrics-url="fop-fonts-metrics/free-monospaced-italic.xml" kerning="yes" embed-url="fop-fonts-glyphs/free-monospaced-italic.ttf">
		<font-triplet name="monospace" style="italic" weight="normal"/>
	</font>
	<!-- Monospace bold italic -->
	<font metrics-url="fop-fonts-metrics/free-monospaced-bold-italic.xml" kerning="yes" embed-url="fop-fonts-glyphs/free-monospaced-bold-italic.ttf">
		<font-triplet name="monospace" style="italic" weight="bold"/>
	</font>
      </fonts>

    </renderer>

    <renderer mime="application/awt">
    </renderer>

    <renderer mime="image/png">
      <!--transparent-page-background>true</transparent-page-background-->
    </renderer>

    <renderer mime="image/tiff">
      <!--transparent-page-background>true</transparent-page-background-->
      <!--compression>CCITT T.6</compression-->
    </renderer>

    <renderer mime="text/xml">
    </renderer>

    <!-- RTF does not have a renderer
    <renderer mime="text/rtf">
    </renderer>
    -->

    <renderer mime="text/plain">
      <pageSize columns="80"/>
    </renderer>

  </renderers>

</fop>

--
Best regards,
 Eduard Tibet


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


Mime
View raw message