xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Weber <peter.we...@garaio.com>
Subject RE: FOP - AFP Rendering in OCR-B
Date Tue, 05 Oct 2010 09:26:26 GMT
Hello

I was playing around with IBM TypeTransformer and thought I found a way to get this working.
Type Transformer Created 3 raster Fonts for me:
- C0A080A0.240
- C0A08000.240
- C0A08090.240

Wow, looks like the mystic characterset I couldn't figure out what it really is! :)

One step forward but it still doesn't work.
Here my Configuration:

<font>
	<afp-font type="raster" codepage="T1000893" encoding="Cp893" base-uri="file:/../ocrb10/">
		<afp-raster-font size="9" characterset="C0A08090"/>
		<afp-raster-font size="10" characterset="C0A08000"/>
		<afp-raster-font size="11" characterset="C0A080A0"/>
	</afp-font>
	<font-triplet name="ocrb10" style="normal" weight="normal"/>
</font>

When I run this with a simple Template. I get following error:
SCHWERWIEGEND: Exception
org.apache.avalon.framework.configuration.ConfigurationException: Failed to load the character
set metrics C0A08090 with
 code page T1000893. I/O error: Resource not found: T1000893


I tried some things with the path:
"../ocrb"
"/../ocrb"
"file:/../ocrb"
"file://../ocrb"   
"file:///../ocrb" 
-> Same Exception as above.

"..\ocrb" 
-> FOP replaces the config with the default config.

base-uri="file:///D:/Labor/REM/REM_Reporting/afp_fop-1.0/OCRB10/"
-> Throws the same Exception as above.


Here the complete stack trace:

05.10.2010 11:25:38 org.apache.fop.apps.FopFactoryConfigurator configure
INFO: Default page-height set to: 11in
05.10.2010 11:25:38 org.apache.fop.apps.FopFactoryConfigurator configure
INFO: Default page-width set to: 8.26in
05.10.2010 11:25:38 org.apache.fop.cli.Main startFOP
SCHWERWIEGEND: Exception
org.apache.avalon.framework.configuration.ConfigurationException: Failed to load the character
set metrics C0A08090 with
 code page T1000893. I/O error: Resource not found: T1000893
        at org.apache.fop.util.LogUtil.handleException(LogUtil.java:53)
        at org.apache.fop.render.afp.AFPRendererConfigurator.setupFontInfo(AFPRendererConfigurator.java:493)
        at org.apache.fop.render.intermediate.IFUtil.setupFonts(IFUtil.java:165)
        at org.apache.fop.render.intermediate.IFRenderer.setupFontInfo(IFRenderer.java:181)
        at org.apache.fop.area.RenderPagesModel.<init>(RenderPagesModel.java:73)
        at org.apache.fop.area.AreaTreeHandler.setupModel(AreaTreeHandler.java:130)
        at org.apache.fop.area.AreaTreeHandler.<init>(AreaTreeHandler.java:102)
        at org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFactory.java:359)
        at org.apache.fop.fo.FOTreeBuilder.<init>(FOTreeBuilder.java:105)
        at org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:101)
        at org.apache.fop.apps.Fop.<init>(Fop.java:79)
        at org.apache.fop.apps.FopFactory.newFop(FopFactory.java:271)
        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:109)
        at org.apache.fop.cli.Main.startFOP(Main.java:174)
        at org.apache.fop.cli.Main.main(Main.java:205)
Caused by: org.apache.avalon.framework.configuration.ConfigurationException: Failed to load
the character set metrics C0
A08090 with code page T1000893. I/O error: Resource not found: T1000893
        at org.apache.fop.render.afp.AFPRendererConfigurator.toConfigurationException(AFPRendererConfigurator.java:284)
        at org.apache.fop.render.afp.AFPRendererConfigurator.fontFromType(AFPRendererConfigurator.java:209)
        at org.apache.fop.render.afp.AFPRendererConfigurator.buildFont(AFPRendererConfigurator.java:138)
        at org.apache.fop.render.afp.AFPRendererConfigurator.buildFontListFromConfiguration(AFPRendererConfigurator.java
:316)
        at org.apache.fop.render.afp.AFPRendererConfigurator.setupFontInfo(AFPRendererConfigurator.java:489)
        ... 13 more
Caused by: java.io.FileNotFoundException: Resource not found: T1000893
        at org.apache.fop.afp.util.DefaultFOPResourceAccessor.createInputStream(DefaultFOPResourceAccessor.java:72)
        at org.apache.fop.afp.fonts.CharacterSetBuilder.openInputStream(CharacterSetBuilder.java:162)
        at org.apache.fop.afp.fonts.CharacterSetBuilder.loadCodePage(CharacterSetBuilder.java:309)
        at org.apache.fop.afp.fonts.CharacterSetBuilder.build(CharacterSetBuilder.java:222)
        at org.apache.fop.render.afp.AFPRendererConfigurator.fontFromType(AFPRendererConfigurator.java:206)
        ... 16 more

---------

org.apache.avalon.framework.configuration.ConfigurationException: Failed to load the character
set metrics C0A08090 with
 code page T1000893. I/O error: Resource not found: T1000893
        at org.apache.fop.render.afp.AFPRendererConfigurator.toConfigurationException(AFPRendererConfigurator.java:284)
        at org.apache.fop.render.afp.AFPRendererConfigurator.fontFromType(AFPRendererConfigurator.java:209)
        at org.apache.fop.render.afp.AFPRendererConfigurator.buildFont(AFPRendererConfigurator.java:138)
        at org.apache.fop.render.afp.AFPRendererConfigurator.buildFontListFromConfiguration(AFPRendererConfigurator.java
:316)
        at org.apache.fop.render.afp.AFPRendererConfigurator.setupFontInfo(AFPRendererConfigurator.java:489)
        at org.apache.fop.render.intermediate.IFUtil.setupFonts(IFUtil.java:165)
        at org.apache.fop.render.intermediate.IFRenderer.setupFontInfo(IFRenderer.java:181)
        at org.apache.fop.area.RenderPagesModel.<init>(RenderPagesModel.java:73)
        at org.apache.fop.area.AreaTreeHandler.setupModel(AreaTreeHandler.java:130)
        at org.apache.fop.area.AreaTreeHandler.<init>(AreaTreeHandler.java:102)
        at org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFactory.java:359)
        at org.apache.fop.fo.FOTreeBuilder.<init>(FOTreeBuilder.java:105)
        at org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:101)
        at org.apache.fop.apps.Fop.<init>(Fop.java:79)
        at org.apache.fop.apps.FopFactory.newFop(FopFactory.java:271)
        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:109)
        at org.apache.fop.cli.Main.startFOP(Main.java:174)
        at org.apache.fop.cli.Main.main(Main.java:205)
Caused by: java.io.FileNotFoundException: Resource not found: T1000893
        at org.apache.fop.afp.util.DefaultFOPResourceAccessor.createInputStream(DefaultFOPResourceAccessor.java:72)
        at org.apache.fop.afp.fonts.CharacterSetBuilder.openInputStream(CharacterSetBuilder.java:162)
        at org.apache.fop.afp.fonts.CharacterSetBuilder.loadCodePage(CharacterSetBuilder.java:309)
        at org.apache.fop.afp.fonts.CharacterSetBuilder.build(CharacterSetBuilder.java:222)
        at org.apache.fop.render.afp.AFPRendererConfigurator.fontFromType(AFPRendererConfigurator.java:206)
        ... 16 more

-----Original Message-----
From: Peter Weber [mailto:peter.weber@garaio.com] 
Sent: Montag, 4. Oktober 2010 14:48
To: fop-users@xmlgraphics.apache.org
Subject: FOP - AFP Rendering in OCR-B

Hi FOP users

One Question as simple as possible.
How do I configure OCR-B font in FOP for the AFP Renderer?

It would be very great if You can tell me which CodePage, Caractersets, Encoding etc., I need
to submit in the fop.xconf.
I need to use OCR-B font in an AFP Document.

Last week I have posted a similar Problem but I think I've lost myself in the problem, there:
http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-users/201010.mbox/browser

Thank You very much for Your help
Peter
Mime
View raw message