Hi, Thanks for your guys help.
But We tried the test, it still didn't work. I attached our fop config file, could you please see if something wrong over there? Thanks, Matt -----Original Message----- From: Vincent Hennebert [mailto:[email protected]] Sent: Friday, January 09, 2009 6:25 AM To: [email protected] Subject: Re: got the exception when generating PDF from FO file Hi Matt, Matt Dong wrote: > Hi, > > > > Actually, we sent the following issue last week, but we are still waiting the > feedback. Is there any update for it? Thanks in advance. > > > 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. Did you set the <font-base> element to the right value? See here: http://xmlgraphics.apache.org/fop/0.95/configuration.html#general-elements If that doesn’t work we are going to need more informations: - in which directory is the font? - in which directory is the config file? - in which directory are you when you run the FOP command? Note that with FOP 0.95 you usually don’t need to generate XML metrics any more. So you can remove the metrics-url attribute below. > 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 HTH, Vincent --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
fop.xconf
Description: Binary data
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
