You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Jeff Vannest <Je...@jandrconsult.com> on 2007/01/26 15:42:49 UTC
Error: Content is not allowed in prolog
I've embedded FOP 0.93 successfully am able to process XML+XSLFO=PDF.
However, when I try embed fonts I get this error message:
Caught exception: javax.xml.transform.TransformerException:
java.lang.RuntimeException: Content is not allowed in prolog.
This only occurs when I place the following into my userconfig.xml file:
<font metrics-url="arial.ttf" embed-url="arial.xml">
<font-triplet name="Arial" style="normal" weight="normal"/>
</font>
The arial.xml file was created using the following command line:
java -cp
build\fop.jar;lib\avalon-framework-4.2.0.jar;lib\commons-logging-1.0.4.jar;l
ib\commons-io-1.1.jar org.apache.fop.fonts.apps.TTFReader ARIAL.TTF
arial.xml
The resulting arial.xml file starts with <?xml version="1.0"
encoding="UTF-8"?> with no preceding characters, and is followed with a line
break and the font-metrics tag as the root.
If I comment out the font metrics for the font everything works correctly
again.
Does anyone know why I'm getting the "Content is not allowed in prolog"
error?
TIA,
Jeff
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: Error: Content is not allowed in prolog
Posted by Jeff Vannest <Je...@jandrconsult.com>.
Oh, man, chagrin. Thank you very much, Jeremias!
Jeff
-----Original Message-----
From: Jeremias Maerki [mailto:dev@jeremias-maerki.ch]
Sent: Friday, January 26, 2007 9:49 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Error: Content is not allowed in prolog
On 26.01.2007 15:42:49 Jeff Vannest wrote:
> I've embedded FOP 0.93 successfully am able to process XML+XSLFO=PDF.
> However, when I try embed fonts I get this error message:
>
> Caught exception: javax.xml.transform.TransformerException:
> java.lang.RuntimeException: Content is not allowed in prolog.
>
> This only occurs when I place the following into my userconfig.xml file:
>
> <font metrics-url="arial.ttf" embed-url="arial.xml">
Should be:
<font metrics-url="arial.xml" embed-url="arial.ttf">
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Error: Content is not allowed in prolog
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
On 26.01.2007 15:42:49 Jeff Vannest wrote:
> I've embedded FOP 0.93 successfully am able to process XML+XSLFO=PDF.
> However, when I try embed fonts I get this error message:
>
> Caught exception: javax.xml.transform.TransformerException:
> java.lang.RuntimeException: Content is not allowed in prolog.
>
> This only occurs when I place the following into my userconfig.xml file:
>
> <font metrics-url="arial.ttf" embed-url="arial.xml">
Should be:
<font metrics-url="arial.xml" embed-url="arial.ttf">
> <font-triplet name="Arial" style="normal" weight="normal"/>
> </font>
>
> The arial.xml file was created using the following command line:
>
> java -cp
> build\fop.jar;lib\avalon-framework-4.2.0.jar;lib\commons-logging-1.0.4.jar;l
> ib\commons-io-1.1.jar org.apache.fop.fonts.apps.TTFReader ARIAL.TTF
> arial.xml
>
> The resulting arial.xml file starts with <?xml version="1.0"
> encoding="UTF-8"?> with no preceding characters, and is followed with a line
> break and the font-metrics tag as the root.
>
> If I comment out the font metrics for the font everything works correctly
> again.
>
> Does anyone know why I'm getting the "Content is not allowed in prolog"
> error?
>
> TIA,
> Jeff
Jeremias Maerki
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org