I never touched 0.20.4, only the 0.20.5, but i remember that to make my fonts to work out, i needed to place the paths in the config file by hand, and explicitly to all files.

And also, i was adding the config from java (well, php but running as if it was java), and i had to use also the full path to make it work...

;)

p.s.- i would recomend an upgrade to the latest version, but... i still remember the pain i had to upgrade my project from 0.20.5 to 0.94... some years ago ;)

Rakesh Kumar S escreveu:
The way my application works is that i get a XML file, use XSL:FO and FOP to 
convert the XML into PDF.
I dont use command line here....

I am sure i am making a mistake bby changing the userconfig.xml inside the fop 
jar directly but am not sure what's the right way of doing it....

Can anyone guide me????
_______________________________________

I don't if this can work.
In my application I use a adapted conf file. To tell this to the fop
processor I use command line parameter "-c".
Regards
Stefan
_______________________________________
From: Rakesh Kumar S
Sent: Friday, May 16, 2008 7:49 PM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Font Recognition in FOP 0.20.4

No luck mate !!!!

Tell me this,

We have the FOP jar and inside that we have the conf/userconfig.xml, i unzip 
this file and change the XML.
Then i zip it back and run the application....

Is this the right approach????


Rakesh Kumar S schrieb:
 <font metrics-file="file:C:/arial.xml" kerning="yes" 
embed-file="file:C:/arial.ttf">
       <font-triplet name="arial" style="normal" weight="normal"/>
 </font>

The URL to your file doesn't seem correct.
Test a little bit, like:
    - "file://C:\arial.xml" (should be most correct URL specification,
but doesn't work every time) or
    - "C:\arial.xml" or
    - "C:/arial.xml"

    [ERROR] : unknown font arail,normal,normal defaulting to any
A Typo?: arail

Regards
Stefan


________________________________________
From: Rakesh Kumar S [EMAIL PROTECTED]
Sent: Friday, May 16, 2008 7:05 PM
To: fop-users@xmlgraphics.apache.org
Subject: Font Recognition in FOP 0.20.4

Hi

I am using fop version 0.20.4, i am a new bee in this arena.

I want to use arial font in my PDF, I had made a post earlier in this mailing 
group and based on that i had referred a URL and had done the following steps.

1. I created a arial.xml file pointing to the arial.ttf file in my system using 
the following command.

java -cp fop.jar;avalon-framework.jar;xml-apis.jar;xercesImpl.jar;xalan.jar 
org.apache.fop.fonts.apps.TTFReader C:\WINDOWS\fonts\arial.ttf arial.xml

2. Then i unzip my FOP jar file and change the userconfig.xml ( I doubt if i am 
doing something wrong here)

3. The changed entries in userconfig are below :

 <font metrics-file="file:C:/arial.xml" kerning="yes" 
embed-file="file:C:/arial.ttf">
       <font-triplet name="arial" style="normal" weight="normal"/>
 </font>

4. Now i place both the ttf and the xml files in the corresponding locations 
and unzip the fop folder back.

5. Now i place the FOP jar in the necessary location and run my application, i 
still get a error stating that
    [ERROR] : unknown font arail,normal,normal defaulting to any.

What is the mistake i am doing???
Could someone please help me in sorting out this???

I know that there are many new version of FOP but i am helpless i have to stick 
to 0.20.4.

I know i am doing some basic mistake, please guide me.

Thanks in Advance

Rakesh

**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are 
not to copy, disclose, or distribute this e-mail or its contents to any other 
person and any such actions are unlawful. This e-mail may contain viruses. 
Infosys has taken every reasonable precaution to minimize this risk, but is not 
liable for any damage you may sustain as a result of any virus in this e-mail. 
You should carry out your own virus checks before opening the e-mail or 
attachment. Infosys reserves the right to monitor and review the content of all 
messages sent to or from this e-mail address. Messages sent to or from this 
e-mail address may be stored on the Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

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

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


<?xml version="1.0"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You 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.
-->
<!-- $Id: fop.xconf 426576 2006-07-28 15:44:37Z jeremias $ -->

<!--

This is an example configuration file for FOP.
This file contains the same settings as the default values
and will have no effect if used unchanged.

Relative config url's will be resolved relative to
the location of this file.

-->

<!-- NOTE: This is the version of the configuration -->
<fop version="1.0">

  <!-- Base URL for resolving relative URLs -->
  <base>.</base>
  
  <!-- 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>72</target-resolution>
  
  <!-- Default page-height and page-width, in case
       value is specified as auto -->
  <default-page-settings height="11in" width="8.26in"/>
  
  <!-- 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 -->
        <!--
        This information must exactly match the font specified
        in the fo file. Otherwise it will use a default font.

        For example,
        <fo:inline font-family="Arial" font-weight="bold" font-style="normal">
            Arial-normal-normal font
        </fo:inline>
        for the font triplet specified by:
        <font-triplet name="Arial" style="normal" weight="bold"/>

        If you do not want to embed the font in the pdf document
        then do not include the "embed-url" attribute.
        The font will be needed where the document is viewed
        for it to be displayed properly.

        possible styles: normal | italic | oblique | backslant
        possible weights: normal | bold | 100 | 200 | 300 | 400
                          | 500 | 600 | 700 | 800 | 900
        (normal = 400, bold = 700)
        -->

        <!--
        <font metrics-url="arial.xml" kerning="yes" embed-url="arial.ttf">
          <font-triplet name="Arial" style="normal" weight="normal"/>
          <font-triplet name="ArialMT" style="normal" weight="normal"/>
        </font>
        <font metrics-url="arialb.xml" kerning="yes" embed-url="arialb.ttf">
          <font-triplet name="Arial" style="normal" weight="bold"/>
          <font-triplet name="ArialMT" style="normal" weight="bold"/>
        </font>
        -->

	
	<!-- capas -->
        <font metrics-url="D:\sites\mapaterapeutico\aplicacao\fonts_d\eu______.xml" kerning="yes" 
	    embed-url="D:\sites\mapaterapeutico\aplicacao\fonts_d\eu______.PFB">
          <font-triplet name="Capa" style="normal" weight="normal"/>
        </font>
	
        <font metrics-url="D:\sites\mapaterapeutico\aplicacao\fonts_d\eub_____.xml" kerning="yes" 
	    embed-url="D:\sites\mapaterapeutico\aplicacao\fonts_d\eub_____.PFB">
          <font-triplet name="Capa" style="normal" weight="bold"/>
        </font>
	
	<!-- titulos e numeros pagina -->
        <font metrics-url="D:\sites\mapaterapeutico\aplicacao\fonts_d\SQR721E.xml" kerning="yes" 
	    embed-url="D:\sites\mapaterapeutico\aplicacao\fonts_d\SQR721E.TTF">
          <font-triplet name="Square" style="normal" weight="normal"/>
        </font>
	
        <font metrics-url="D:\sites\mapaterapeutico\aplicacao\fonts_d\SQR721B.xml" kerning="yes" 
	    embed-url="D:\sites\mapaterapeutico\aplicacao\fonts_d\SQR721B.TTF">
          <font-triplet name="Square" style="normal" weight="bold"/>
        </font>
	
	<!-- textos -->
	<!-- Texto = textos normais e TextoBT = titulos etc -->
        <font metrics-url="D:\sites\mapaterapeutico\aplicacao\fonts_d\SWZ721l.xml" kerning="yes" 
	    embed-url="D:\sites\mapaterapeutico\aplicacao\fonts_d\SWZ721l.TTF">
          <font-triplet name="Texto" style="normal" weight="normal"/>
        </font>
        <font metrics-url="D:\sites\mapaterapeutico\aplicacao\fonts_d\SWZ721li.xml" kerning="yes" 
	    embed-url="D:\sites\mapaterapeutico\aplicacao\fonts_d\SWZ721li.TTF">
          <font-triplet name="Texto" style="italic" weight="normal"/>
        </font>
        <font metrics-url="D:\sites\mapaterapeutico\aplicacao\fonts_d\SWZ721B.xml" kerning="yes" 
	    embed-url="D:\sites\mapaterapeutico\aplicacao\fonts_d\SWZ721B.TTF">
          <font-triplet name="Texto" style="normal" weight="bold"/>
          <font-triplet name="TextoBT" style="normal" weight="bold"/>
        </font>
	
        <font metrics-url="D:\sites\mapaterapeutico\aplicacao\fonts_d\SWZ721Bi.xml" kerning="yes" 
	    embed-url="D:\sites\mapaterapeutico\aplicacao\fonts_d\SWZ721Bi.TTF">
          <font-triplet name="Texto" style="italic" weight="bold"/>
          <font-triplet name="TextoBT" style="italic" weight="bold"/>
        </font>
        <font metrics-url="D:\sites\mapaterapeutico\aplicacao\fonts_d\SWZ721n.xml" kerning="yes" 
	    embed-url="D:\sites\mapaterapeutico\aplicacao\fonts_d\SWZ721n.TTF">
          <font-triplet name="TextoBT" style="normal" weight="normal"/>
        </font>
        <font metrics-url="D:\sites\mapaterapeutico\aplicacao\fonts_d\SWZ721i.xml" kerning="yes" 
	    embed-url="D:\sites\mapaterapeutico\aplicacao\fonts_d\SWZ721i.TTF">
          <font-triplet name="TextoBT" style="italic" weight="normal"/>
        </font>
        
        <font metrics-url="D:\sites\mapaterapeutico\aplicacao\fonts_d\SWZ721c.xml" kerning="yes" 
	    embed-url="D:\sites\mapaterapeutico\aplicacao\fonts_d\SWZ721c.TTF">
          <font-triplet name="Titulo" style="normal" weight="normal"/>
        </font>

        <font metrics-url="D:\sites\mapaterapeutico\aplicacao\fonts_d\SQR721be.xml" kerning="yes" 
	    embed-url="D:\sites\mapaterapeutico\aplicacao\fonts_d\SQR721be.TTF">
          <font-triplet name="SquareEX" style="normal" weight="bold"/>
        </font>

	</fonts>

      <!-- This option lets you specify additional options on an XML handler -->
      <!--xml-handler namespace="http://www.w3.org/2000/svg";>
        <stroke-text>false</stroke-text>
      </xml-handler-->

    </renderer>

    <renderer mime="application/postscript">
      <!-- This option forces the PS renderer to rotate landscape pages -->
      <!--auto-rotate-landscape>true</auto-rotate-landscape-->
      
      <!-- This option lets you specify additional options on an XML handler -->
      <!--xml-handler namespace="http://www.w3.org/2000/svg";>
        <stroke-text>false</stroke-text>
      </xml-handler-->
    </renderer>

    <renderer mime="application/vnd.hp-PCL">
    </renderer>

    <!-- MIF does not have a renderer
    <renderer mime="application/vnd.mif">
    </renderer>
    -->

    <renderer mime="image/svg+xml">
      <format type="paginated"/>
      <link value="true"/>
      <strokeText value="false"/>
    </renderer>

    <renderer mime="application/awt">
    </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>


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

Reply via email to