embedding fonts

Here should go questions about transforming XML with XSLT and FOP.
Chris1977

embedding fonts

Mon Jan 10, 2005 5:35 pm

Hi there!

I've got problems to embed a font.
I created a config file as shown:

------------------------------------------------------------------------
<!--<!DOCTYPE configuration SYSTEM "config.dtd">-->


<configuration>

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


</configuration>

--------------------------------------

When i now execute i get the error message

"ERROR] unknown font arial,normal,bold so defaulted font to any"


Can somebody help me!

Thanks!
Chris
sorin_ristache
Posts: 4144

Tue Jan 11, 2005 11:51 am

Hello,

You didn't set the FOP configuration file in Options -> Preferences -> FO processors or the name of the metrics file is not correct in the configuration file.

Regards,
Sorin
Chris1977
Posts: 2

Tue Jan 11, 2005 12:10 pm

Thank you for your fast answer!

But I have registered the config file.
The metric file is in the same folder like the config file and the xsl and xml file. And it has the right name?

Still it doesn't work!?

Thank You
Chris
sorin_ristache
Posts: 4144

Tue Jan 11, 2005 12:32 pm

What is the xsl file ? You aren't using Docbook XSL ?
Chris1977
Posts: 2

Tue Jan 11, 2005 12:45 pm

HI!

My XSL file is as followed:

--------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="body.font.family">arial</xsl:param>
<xsl:output method="xml" version="1.0"/>
<xsl:template match="angebot">
<fo:root>
<fo:layout-master-set>
<fo:simple-page-master master-name="Angebot" page-width="21cm" page-height="29.7cm" margin-top="7mm" margin-bottom="1cm" margin-left="1cm" margin-right="1cm">
<fo:region-body margin="0mm 0mm 20mm 0mm" />
<fo:region-after border-before-style="solid" borderwidth="1pt" extent="10mm" display-align="after" />
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="Angebot">
<fo:static-content flow-name="xsl-region-after">
<fo:block font-size="8pt">Fußbereich:</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block font-size="10pt" font-weight="bold" marginleft="35mm" space-before="4mm">


<fo:table width="100%" table-layout="fixed">
<fo:table-column column-width="17cm"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>

<fo:table table-layout="fixed">
<fo:table-column column-width="12cm"/>
<fo:table-column column-width="1cm"/>
<fo:table-column column-width="4cm"/>
<fo:table-body>
<fo:table-row >
<fo:table-cell number-columns-spanned="2">
<fo:block font-size="19pt">MERCEDES JAHRESWAGEN ZECH</fo:block>
</fo:table-cell>
<fo:table-cell number-rows-spanned="3">
<fo:block text-align="left">
<fo:external-graphic width="4cm" src="logo.jpg"/>www.jawadirekt.de
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row height="5px">
<fo:table-cell number-columns-spanned="2">
<fo:block font-family="Courier">
<fo:leader leader-pattern="dots" leader-pattern-width="8pt" leader-length="100%" />
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row height="1cm">
<fo:table-cell>
<fo:block font-family="arial">
Der Fahrzeugabwicklung (Bestellung / Lieferung / Zahlung) liegen die
Allg. Geschäftsbedingungen für den Verkauf gebrauchter Fahrzeuge
nach der unverbindlichen Empfehlung des Zentralverbandes Deutsches
Kraftfahrzeuggewerbe e.V. (ZDK), Bonn, in aktueller Version-, sowie die
Jawa-Direkt-Geschäftsbedingungen ( http://www.jawadirekt.de ) zugrunde.
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block font-family="Courier"></fo:block>
</fo:table-cell>
</fo:table-row>

<fo:table-row>
<fo:table-cell>

<fo:table width="8cm" height="4cm" border-style="solid" table-layout="fixed">
<fo:table-column column-width="100%"/>
<fo:table-body>
<fo:table-row height="5mm">
<fo:table-cell>
<fo:block font-size="7px" text-align="justify">
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row background-color="silver">
<fo:table-cell>
<fo:block font-size="7px" text-align="justify">
JAWA DIREKT Brigitte Zech Mozartstraße 1 56457 Westerburg
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row >
<fo:table-cell>
<fo:block font-size="13px">
<xsl:value-of select="kunde/firstName"/> <xsl:value-of select="kunde/lastName"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row >
<fo:table-cell>
<fo:block font-size="13px">
<xsl:value-of select="kunde/Adress/street"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row >
<fo:table-cell>
<fo:block font-size="13px">
<xsl:value-of select="kunde/Adress/city"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>

</fo:table-cell>
<fo:table-cell>
<fo:block font-family="Courier" font-size="10"></fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block font-family="Courier">JAWA DIREKT</fo:block>
<fo:block font-family="Courier">Brigitte Zech</fo:block>
<fo:block font-family="Courier">Mozartstraße 1</fo:block>
<fo:block font-family="Courier">56457 Westerburg</fo:block>
<fo:block font-family="Courier"><fo:leader leader-pattern="dots" leader-pattern-width="8pt" leader-length="100%" /> </fo:block>
<fo:block font-family="Courier">Tel. 02663 - 91 74 85</fo:block>
<fo:block font-family="Courier">Tel. 02663 - 99 01 0</fo:block>
<fo:block font-family="Courier">Fax. 02663 - 99 01 88</fo:block>
<fo:block font-family="Courier"><fo:leader leader-pattern="dots" leader-pattern-width="8pt" leader-length="100%" /> </fo:block>
<fo:block font-family="Courier">Bankverbindung Kreissparkasse WW</fo:block>
<fo:block font-family="Courier">BLZ 570 510 01</fo:block>
<fo:block font-family="Courier">Konto 2 - 123 115</fo:block>
<fo:block font-family="Courier"><fo:leader leader-pattern="dots" leader-pattern-width="8pt" leader-length="100%" /> </fo:block>
<fo:block font-family="Courier">DE 148 553 830</fo:block>
<fo:block font-family="Courier">BLZ 570 510 01</fo:block>
<fo:block font-family="Courier">Konto 2 - 123 115</fo:block>
</fo:table-cell>
</fo:table-row>

</fo:table-body>
</fo:table>

</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>

</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>

-------------------------------------------------

And here is my xml file:


-----------------------------------------------------


<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="angebot.xsl"?>
<angebot xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file://Jungle/htdocs/JawaDirekt/Jawa2/xml/angebot.xsd">
<kunde>
<lastName>Test</lastName>
<firstName>Christian</firstName>
<Adress>
<street>Musterstraße</street>
<postalCode>55555</postalCode>
<city>Test</city>
</Adress>
</kunde>
<car>
<typ>C 200 K</typ>
<lack>grün</lack>
<polster>schwarz</polster>
<preis_neu>15.500</preis_neu>
<preis_privat>12.300</preis_privat>
<zulassung>10.08.2004</zulassung>
<kilometer>2.555</kilometer>
<mwst>1</mwst>
<mietwagen>0</mietwagen>
<unfall>0</unfall>
<kommentar>jo</kommentar>
<ausstattung>
<id>580</id>
<name>Klimaautomatik</name>
</ausstattung>
</car>
</angebot>

-----------------------------------------------------

In Oxygen i go to the XML file and then i use the built in fo pdf.

Thanks!
Chris
sorin_ristache
Posts: 4144

Tue Jan 11, 2005 2:43 pm

Please send the files arial.xml and arial.ttf to support@oxygenxml.com

Regards,
Sorin

Return to “XSLT and FOP”

Who is online

Users browsing this forum: No registered users and 2 guests