[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Unable to add Garamond font in PDF, characters displayed as '#'
Unable to add Garamond font in PDF. I follow instructions at
http://www.sagehill.net/docbookxsl/AddFont.html.
Characters in generated PDF file are displayed as "#". Can some1 help.
fop.bat version = 0.91Beta
Commands ran:
==============
java -cp
build\fop.jar;lib\avalon-framework-4.2.0.jar;lib\batik-all-1.6.jar;lib\commons-io-1.1.jar;
lib\commons-logging-1.0.4.jar;lib\serializer-2.7.0.jar;lib\xalan-2.7.0.jar;
lib\xercesImpl-2.7.1.jar;lib\xml-apis-1.3.02.jar
org.apache.fop.fonts.apps.TTFReader -enc ansi
C:\WINDOWS\fonts\GARA.TTF C:\MyDocBook\Dev\fonts\gara.xml
java -cp
build\fop.jar;lib\avalon-framework-4.2.0.jar;lib\batik-all-1.6.jar;lib\commons-io-1.1.jar;
lib\commons-logging-1.0.4.jar;lib\serializer-2.7.0.jar;lib\xalan-2.7.0.jar;
lib\xercesImpl-2.7.1.jar;lib\xml-apis-1.3.02.jar
org.apache.fop.fonts.apps.TTFReader -enc ansi
C:\WINDOWS\fonts\GARABD.TTF C:\MyDocBook\Dev\fonts\garabd.xml
java -cp
build\fop.jar;lib\avalon-framework-4.2.0.jar;lib\batik-all-1.6.jar;lib\commons-io-1.1.jar;
lib\commons-logging-1.0.4.jar;lib\serializer-2.7.0.jar;lib\xalan-2.7.0.jar;
lib\xercesImpl-2.7.1.jar;lib\xml-apis-1.3.02.jar
org.apache.fop.fonts.apps.TTFReader -enc ansi
C:\WINDOWS\fonts\GARAIT.TTF C:\MyDocBook\Dev\fonts\garait.xml
xsltproc --output MinTestPDF.fo file:///C:/MyDocBook/Dev/MyDocBook.xsl MinTestPDF.xml
fop.bat -c C:\MyDocBook\Dev\userconfig.xml MinTestPDF.fo MinTestPDF.pdf
Docbook data file( MinTestPDF.xml ):
==============================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<article>
<articleinfo>
<date>2006-04-06</date>
<title>Testing printed PDF output</title>
</articleinfo>
<section>
<title>Test</title>
<para>Garamond font show be displayed here.</para>
</section>
</article>
Cutomization layer(MyDocBook.xsl):
=============================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:date="http://exslt.org/dates-and-times"
version="1.0">
<xsl:import href="../docbook-xsl/fo/docbook.xsl"/><!-- Import original DocBook XSL -->
<xsl:param name="body.font.family">Garamond</xsl:param>
</xsl:stylesheet>
userconfig.xml:
=============
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<fonts>
<font metrics-file="file:///C:/MyDocBook/Dev/fonts/gara.xml" kerning="yes"
embed-file="file://c:/Windows/fonts/GARA.TTF">
<font-triplet name="Garamond" style="normal" weight="normal"/>
</font>
<font metrics-file="file:///C:/MyDocBook/Dev/fonts/garabd.xml" kerning="yes"
embed-file="file://c:/Windows/fonts/GARABD.TTF">
<font-triplet name="Garamond" style="normal" weight="bold"/>
</font>
<font metrics-file="file:///C:/MyDocBook/Dev/fonts/garait.xml" kerning="yes"
embed-file="file://c:/Windows/fonts/GARAIT.TTF">
<font-triplet name="Garamond" style="italic" weight="normal"/>
</font>
</fonts>
</configuration>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]