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 Nicolae Marasoiu <ni...@kepler-rominfo.com> on 2009/06/05 14:20:40 UTC

Font error

Hi;

I use a font, as attached (automatically templating-generated FO source, FOP config, ttf font, metrics xml). When generating PNG image things are stable. When outputing pdf, from local app, it is also stable. When outputing pdf from webapp, the following error occurs frequently, which can be overcame by overriding the ttf file and restarting the web app.

org.apache.commons.logging.impl.Jdk14Logger error Failed to embed font [metrics-url=ocrb.xml, embed-url=IDAutomationSOCRb.ttf, kerning=false] EAAAAC+IDAutomationSOCRb
                                 java.io.EOFException: Reached EOF, file size=41495 offset=132362
	at org.apache.fop.fonts.truetype.FontFileReader.seekSet(FontFileReader.java:86)
	at org.apache.fop.fonts.truetype.FontFileReader.readTTFShort(FontFileReader.java:220)
	at org.apache.fop.fonts.truetype.TTFSubSetFile.scanGlyphs(TTFSubSetFile.java:591)
	at org.apache.fop.fonts.truetype.TTFSubSetFile.readFont(TTFSubSetFile.java:664)
	at org.apache.fop.pdf.PDFFactory.makeFontFile(PDFFactory.java:1434)
	at org.apache.fop.pdf.PDFFactory.makeFontDescriptor(PDFFactory.java:1336)
	at org.apache.fop.pdf.PDFFactory.makeFont(PDFFactory.java:1194)
	at org.apache.fop.pdf.PDFResources.addFonts(PDFResources.java:118)
	at org.apache.fop.render.pdf.PDFRenderer.stopRenderer(PDFRenderer.java:515)
	at org.apache.fop.area.RenderPagesModel.endDocument(RenderPagesModel.java:240)
	at org.apache.fop.area.AreaTreeHandler.endDocument(AreaTreeHandler.java:305)
	at org.apache.fop.fo.FOTreeBuilder.endDocument(FOTreeBuilder.java:156)
	at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source)
	at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)
	at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
	at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
	at javax.xml.parsers.SAXParser.parse(Unknown Source)
	at instrdebit.service.PrintServiceImpl.generate(PrintServiceImpl.java:90)


Re: Font error

Posted by Andreas Delmelle <an...@telenet.be>.
On 05 Jun 2009, at 14:20, Nicolae Marasoiu wrote:

Hi Nicolae

> I use a font, as attached (automatically templating-generated FO  
> source, FOP config, ttf font, metrics xml). When generating PNG  
> image things are stable. When outputing pdf, from local app, it is  
> also stable. When outputing pdf from webapp, the following error  
> occurs frequently, which can be overcame by overriding the ttf file  
> and restarting the web app.

What do you mean by 'overriding' the TTF file? Is the one in the  
webapp context different?

BTW: Which FOP version are you using? If 0.95, then you should  
normally no longer need a separate metrics file, as FOP will generate  
it on-the-fly, as long as it has access to the font file and is  
configured to detect it.

See: http://xmlgraphics.apache.org/fop/0.95/fonts.html#basics

> org.apache.commons.logging.impl.Jdk14Logger error Failed to embed  
> font [metrics-url=ocrb.xml, embed-url=IDAutomationSOCRb.ttf,  
> kerning=false] EAAAAC+IDAutomationSOCRb
>                                 java.io.EOFException: Reached EOF,  
> file size=41495 offset=132362

Can't say I've seen this one before... Do you get this error every  
time, or only on the second or subsequent runs?


Regards

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org