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 Matt Dong <ma...@camilion.com> on 2009/01/05 19:43:03 UTC
got the exception when generating PDF from FO file
Hi,
We got the convertFo2Pdf failed exception when using FO file to generate the PDF file.
The problem is that we try to use ARIALUNI.TTF font and set it In the fop.xconf file. When generating the PDF file, we get the exception. But if there is no font setting in the fop.xconf, no exception happen.
The following is the setting in the fop.xconf config file,
<font metrics-url="arialuni.xml" kerning="yes" embed-url="ARIALUNI.TTF">
<font-triplet name="ArialUnicodeMS" style="normal" weight="normal"/>
<font-triplet name="ArialUnicodeMS" style="normal" weight="bold"/>
<font-triplet name="ArialUnicodeMS" style="italic" weight="normal"/>
</font>
We have the ARIALUNI.TTF and arialuni.xml and save them in the correct directory.
The exception only happens on fop.jar (0.95), but change back to fop.jar(0.93) works fine. We also tried the latest fop.jar 0.95 which generated from FOP trunk, but still got the exception.
Message: convertFo2Pdf failed.
org.apache.fop.apps.FOPException: Failed to resolve font with embed-url 'ARIALUNI.TTF'
UserMessage: convertFo2Pdf failed
org.apache.fop.apps.FOPException: Failed to resolve font with embed-url 'ARIALUNI.TTF'
38 org.apache.fop.util.LogUtil handleError LogUtil.java
275 org.apache.fop.render.PrintRendererConfigurator getFontInfoFromConfiguration PrintRendererConfigurator.java
207 org.apache.fop.render.PrintRendererConfigurator buildFontListFromConfiguration PrintRendererConfigurator.java
95 org.apache.fop.render.PrintRendererConfigurator configure PrintRendererConfigurator.java
71 org.apache.fop.render.pdf.PDFRendererConfigurator configure PDFRendererConfigurator.java
187 org.apache.fop.render.RendererFactory createRenderer RendererFactory.java
68 org.apache.fop.area.RenderPagesModel <init> RenderPagesModel.java
127 org.apache.fop.area.AreaTreeHandler setupModel AreaTreeHandler.java
102 org.apache.fop.area.AreaTreeHandler <init> AreaTreeHandler.java
224 org.apache.fop.render.RendererFactory createFOEventHandler RendererFactory.java
100 org.apache.fop.fo.FOTreeBuilder <init> FOTreeBuilder.java
100 org.apache.fop.apps.Fop createDefaultHandler Fop.java
78 org.apache.fop.apps.Fop <init> Fop.java
247 org.apache.fop.apps.FopFactory newFop FopFactory.java
Thanks,
Matt Dong
Re: Using FOP in sandbox environment
Posted by Chris Bowditch <bo...@hotmail.com>.
Fournier,Danny [NCR] wrote:
> I'm currently trying to use FOP 0.95 on Coldfusion 8 (on Windows) using
> sandbox security. The only way to generate my PDFs is to give the
> Coldfusion service full access to the entire drive. I'm using the
> embedding example.
>
> I'm wondering if someone on this list could help me narrow down the list
> of folders that could potentially be opened in order for FOP to work?
>
> Obviously, the first one would be the folder where my classes are
> situated (which is specified in the classpath) Then, the fonts folder
> maybe? How about JVM cache folders (if there are any)? I'm really at a
> loss here.
When it fails do you see any sort of error message? Can you try running
from the command line to reproduce the error there?
Perhaps the problem is that you've added the <auto-detect/> element to
fop.xconf file, which tells FOP to search your hard disk for Fonts.
Thanks,
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Re: Using FOP in sandbox environment
Posted by Johannes Künsebeck <ku...@gmx.net>.
Am Montag, den 05.01.2009, 14:37 -0500 schrieb Fournier,Danny [NCR]:
> I'm currently trying to use FOP 0.95 on Coldfusion 8 (on Windows) using
> sandbox security. The only way to generate my PDFs is to give the
> Coldfusion service full access to the entire drive. I'm using the
> embedding example.
>
> I'm wondering if someone on this list could help me narrow down the list
> of folders that could potentially be opened in order for FOP to work?
>
Fop also needs also access to the folder ~/.fop (folder ".fop" in the
homedir of the fop-executing user) under Linux, no idea how this
translates to a windows environment.
Regards, Hannes
> Obviously, the first one would be the folder where my classes are
> situated (which is specified in the classpath) Then, the fonts folder
> maybe? How about JVM cache folders (if there are any)? I'm really at a
> loss here.
>
> Regards,
>
> Dan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: Using FOP in sandbox environment
Posted by "Fournier,Danny [NCR]" <Da...@ec.gc.ca>.
Fixed.
The way permissions were given for the sanboxes was the reason this
wasn't working.
Thanks to all for the suggestions.
> -----Original Message-----
> From: Fournier,Danny [NCR] [mailto:Danny.Fournier@ec.gc.ca]
> Sent: January 7, 2009 6:16 AM
> To: fop-users@xmlgraphics.apache.org
> Subject: RE: Using FOP in sandbox environment
>
>
>
> > -----Original Message-----
> > From: Chris Bowditch [mailto:bowditch_chris@hotmail.com]
> > Sent: January 6, 2009 4:07 AM
> > To: fop-users@xmlgraphics.apache.org
> > Subject: Re: Using FOP in sandbox environment
> >
> > Fournier,Danny [NCR] wrote:
> >
> > > I'm currently trying to use FOP 0.95 on Coldfusion 8 (on Windows)
> > > using sandbox security. The only way to generate my PDFs
> is to give
> > > the Coldfusion service full access to the entire drive. I'm
> > using the
> > > embedding example.
> > >
> > > I'm wondering if someone on this list could help me
> narrow down the
> > > list of folders that could potentially be opened in order
> > for FOP to work?
> > >
> > > Obviously, the first one would be the folder where my classes are
> > > situated (which is specified in the classpath) Then, the
> > fonts folder
> > > maybe? How about JVM cache folders (if there are any)? I'm
> > really at a
> > > loss here.
> >
> > When it fails do you see any sort of error message? Can you try
> > running from the command line to reproduce the error there?
> >
> > Perhaps the problem is that you've added the <auto-detect/>
> element to
> > fop.xconf file, which tells FOP to search your hard disk for Fonts.
> >
>
> I do see an error, but it goes away when we get rid of
> sandbox security.
> I haven't modified the fop.xconf file as this is the first
> time I've read about it :)
>
> Error:
> java.lang.UnsupportedOperationException: Don't know how to
> handle "application/pdf" as an output format. Neither an
> FOEventHandler, nor a Renderer could be found for this output format.
>
> All the classes are at the same spot in a folder specified in
> the classpath.
>
> Dan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
RE: Using FOP in sandbox environment
Posted by "Fournier,Danny [NCR]" <Da...@ec.gc.ca>.
> -----Original Message-----
> From: Chris Bowditch [mailto:bowditch_chris@hotmail.com]
> Sent: January 6, 2009 4:07 AM
> To: fop-users@xmlgraphics.apache.org
> Subject: Re: Using FOP in sandbox environment
>
> Fournier,Danny [NCR] wrote:
>
> > I'm currently trying to use FOP 0.95 on Coldfusion 8 (on Windows)
> > using sandbox security. The only way to generate my PDFs is to give
> > the Coldfusion service full access to the entire drive. I'm
> using the
> > embedding example.
> >
> > I'm wondering if someone on this list could help me narrow down the
> > list of folders that could potentially be opened in order
> for FOP to work?
> >
> > Obviously, the first one would be the folder where my classes are
> > situated (which is specified in the classpath) Then, the
> fonts folder
> > maybe? How about JVM cache folders (if there are any)? I'm
> really at a
> > loss here.
>
> When it fails do you see any sort of error message? Can you
> try running from the command line to reproduce the error there?
>
> Perhaps the problem is that you've added the <auto-detect/>
> element to fop.xconf file, which tells FOP to search your
> hard disk for Fonts.
>
I do see an error, but it goes away when we get rid of sandbox security.
I haven't modified the fop.xconf file as this is the first time I've
read about it :)
Error:
java.lang.UnsupportedOperationException: Don't know how to handle
"application/pdf" as an output format. Neither an FOEventHandler, nor a
Renderer could be found for this output format.
All the classes are at the same spot in a folder specified in the
classpath.
Dan
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Using FOP in sandbox environment
Posted by "Fournier,Danny [NCR]" <Da...@ec.gc.ca>.
I'm currently trying to use FOP 0.95 on Coldfusion 8 (on Windows) using
sandbox security. The only way to generate my PDFs is to give the
Coldfusion service full access to the entire drive. I'm using the
embedding example.
I'm wondering if someone on this list could help me narrow down the list
of folders that could potentially be opened in order for FOP to work?
Obviously, the first one would be the folder where my classes are
situated (which is specified in the classpath) Then, the fonts folder
maybe? How about JVM cache folders (if there are any)? I'm really at a
loss here.
Regards,
Dan
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org