I want to use Unicode for displaying an pound character in my pdf.

For this reason i created an dummy xml file

<?xml version="1.0" encoding="ISO-8859-1"?>


and an dummy xsl stylesheet

<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet version="1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml";

  <!-- the formatting of the region-body in a list view-->
 <xsl:attribute-set name="regionbefore">
  <xsl:attribute name="extent">15mm</xsl:attribute>

 <!-- the formatting of the region-body in a list view-->
 <xsl:attribute-set name="regionbody">
  <xsl:attribute name="margin-top">15mm</xsl:attribute>
  <xsl:attribute name="extent">232mm</xsl:attribute>
  <xsl:attribute name="margin-bottom">16mm</xsl:attribute>


 <!-- the formatting of the region-after-->
 <xsl:attribute-set name="regionafter">
  <xsl:attribute name="extent">5mm</xsl:attribute>

 <xsl:attribute-set name="simple-page-master">
  <xsl:attribute name="page-height">29.7cm</xsl:attribute>
  <xsl:attribute name="page-width">21cm</xsl:attribute>
  <xsl:attribute name="margin-top">2.5cm</xsl:attribute>
  <xsl:attribute name="margin-bottom">2cm</xsl:attribute>
  <xsl:attribute name="margin-left">2.5cm</xsl:attribute>
  <xsl:attribute name="margin-right">2cm</xsl:attribute>
  <xsl:attribute name="master-name">simple</xsl:attribute>

 <xsl:template match="/">
  <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
    <!-- fo:layout-master-set defines in its children the page layout:
           the pagination and layout specifications
          - page-masters: have the role of describing the intended
                           of a page and the geometry of these subdivisions
                          In this case there is only a simple-page-master
which defines the
                          layout for all pages of the text
    <!-- layout information -->
    <fo:simple-page-master xsl:use-attribute-sets="simple-page-master">
     <fo:region-before xsl:use-attribute-sets="regionbefore" />
        <fo:region-body xsl:use-attribute-sets="regionbody" />
        <fo:region-after xsl:use-attribute-sets="regionafter" />

    <fo:page-sequence master-reference="simple">
      <fo:flow flow-name="xsl-region-body">
       Character: <xsl:value-of select="//a/b" />
       Character UNICODE: <xsl:value-of select="//a/c" />
      </fo:flow> <!-- closes the flow element-->
    </fo:page-sequence> <!-- closes the page-sequence -->


I read the FAQ for FOP and thers written:
"All the characters you need are available at
http://www.unicode.org/charts/. If you need a character it will be there.
Once you have found the hex or decimal code for the character then you can
use this in you xml document. It will be in the form &#<decimal value>; or
&#x<hex value>;.

You must have a font that supports the character you need otherwise it will
replace it with a "#" in the output. "

Ok, now i browsed the unicode page , searched for the pound character and
found it.

http://www.unicode.org/charts/PDF/U20A0.pdf - it has the sequence 20A4 (see
dummy xml file above)

But i dont get it to work , the resulting pdf alwys displays the # character
for unicode but for the sequence &#163;(which i have taken from a html
reference) he displays

the pound sign.What did i wrong ? (It cant be he wrong font i think, because
he can display pound signs at all).

Tank you very much,


To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to