Hi Peter, Thank You very much for Your answer. It took some time to proof all of your tipps.
------------------------------------------------------------------- First off, what version of FOP are you using? This will have some baring on what support there will be available for you. ------------------------------------------------------------------- -> I'm using the new Version of FOP 1.0 -> It should provide better support for AFP than older versions ------------------------------------------------------------------- Have you taken a look at the FOP docs or the wiki? http://xmlgraphics.apache.org/fop/trunk/output.html#afp-font-config http://wiki.apache.org/xmlgraphics-fop/AFPFonts ------------------------------------------------------------------- -> Yes I have... my biggest problem seems to be the understanding of configuring custom GCUID fonts. ----------------------------------------------------------------------- There are a few problems i can spot with your config. Most notably, the afp-raster-f...@characterset should refer to the actual character data for the custom font you want to embed and that you have made available to FOP - you are instead referencing IBM base fonts that should be available in any AFP environments (Print servers or viewers) that you are using. ----------------------------------------------------------------------- -> On http://www-03.ibm.com/systems/i/software/globalization/codepages.html I found codepages for OCR-B Font. -> FOP tells me, it can't find any of them: org.apache.avalon.framework.configuration.ConfigurationException: Failed to load the character set metrics CZJHMNU with code page T1000893. I/O error: Resource not found: T1000893 -> Of course, the used character set isn't correct, but how do I find the right one? -> I'm not sure but it seems to me, these codepages aren't available to FOP...? -> I cannot imagine IBM printers, also AFP Output of FOP, can live without the OCR font. It is essential for bills and other OCR issues. ---------------------------------------------------------------------------------------- The font-triplet element configures how you can reference the font in your .fo document. ---------------------------------------------------------------------------------------- -> this is one of the only things I understood till now :) ------------------------------------------------------------------------------------------------------------- I am guessing that the AFP you generate, whilst referencing ocrb[10], actually results in the default Times Roman font. -------------------------------------------------------------------------------------------------------------- -> Yes, this is true... my snippet was not optimal. I had to post anything to illustrate where I stand. ------------------------------------------------------------------------ To resolve this you need to first determine what kind of font you have (outline (.OLN), raster- this usually comes with a collection of files for different sizes and styles). This may not be that obvious to you and I have had trouble myself doing the same thing. I have resorted to using and AFP binary reader to determine this - maybe some other AFP FOP users have some better instructions for you on this subject. ------------------------------------------------------------------------ -> Under the following link You can find the font I need to embed: http://ansuz.sooke.bc.ca/software/ocrb-complete.zip -> It contains multiple formats. AFM, PFB, TTF and PFM Another approach was to refer to the directory with the OCR fonts: <font> <afp-font type="CIDKeyed" characterset="CZJHMNU" codepage="T1000893" encoding="UnicodeBigUnmarked" base-uri="file:///D:/Labor/REM/REM_Reporting/fop-1.0/ocrb-full/" /> <font-triplet name="ocrb10" style="normal" weight="normal" /> </font> The same problem here is the absence of the codepage 'T1000893' or 'T1000877'. What is the correct codepage for OCR-B? How do I find correct characterset? Or how do I build the correct characterset-reference string using these tables? http://www-03.ibm.com/systems/resources/systems_i_software_globalization_pdf_cp00877z.pdf What is the meaning of the letters in the string for charactersets? CZJHMNU This isn't a HEX value... It would be very great to get this working and I really appreciate any help I could get. Thanks in advice Peter -----Original Message----- From: Peter Hancock [mailto:[email protected]] Sent: Donnerstag, 30. September 2010 11:50 To: [email protected] Subject: Re: Font mapping for AFP Output Hi Peter, First off, what version of FOP are you using? This will have some baring on what support there will be available for you. Have you taken a look at the FOP docs or the wiki? http://xmlgraphics.apache.org/fop/trunk/output.html#afp-font-config http://wiki.apache.org/xmlgraphics-fop/AFPFonts There are a few problems i can spot with your config. Most notably, the afp-raster-f...@characterset should refer to the actual character data for the custom font you want to embed and that you have made available to FOP (see base element in http://xmlgraphics.apache.org/fop/trunk/configuration.html#general or afp-f...@base-uri) - you are instead referencing IBM base fonts that should be available in any AFP environments (Print servers or viewers) that you are using. The font-triplet element configures how you can reference the font in your .fo document. I am guessing that the AFP you generate, whilst referencing ocrb[10], actually results in the default Times Roman font. To resolve this you need to first determine what kind of font you have (outline (.OLN), raster- this usually comes with a collection of files for different sizes and styles). This may not be that obvious to you and I have had trouble myself doing the same thing. I have resorted to using and AFP binary reader to determine this - maybe some other AFP FOP users have some better instructions for you on this subject. Once you know the font refer to the the FOP docs for the relevant configuration and reply to this thread if troubles persist. I hope I have been of some help. Peter Hancock On Wed, Sep 29, 2010 at 1:55 PM, Peter Weber <[email protected]> wrote: > Hi all > > > > This week i stuck at mapping fonts for AFP output format in fop. > > > > I don't have any experience with fonts, codepages and charactersets. > > Can someone please explain me, how to map a font in the fop.xconf for AFP > format? > > > > Following is a part of the config I am playing with: > > > > <font> > > <afp-font name="ocrb10" type="raster" codepage="T1E00877" encoding="Cp500"> > > <afp-raster-font size="6" characterset="C0N20060" base14-font="TimesRoman"/> > > <afp-raster-font size="7" characterset="C0N20070" base14-font="TimesRoman"/> > > <afp-raster-font size="8" characterset="C0N20080" base14-font="TimesRoman"/> > > <afp-raster-font size="9" characterset="C0N20090" base14-font="TimesRoman"/> > > <afp-raster-font size="10" characterset="C0N20000" > base14-font="TimesRoman"/> > > <afp-raster-font size="11" characterset="C0N200A0" > base14-font="TimesRoman"/> > > <afp-raster-font size="12" characterset="C0N200B0" > base14-font="TimesRoman"/> > > <afp-raster-font size="14" characterset="C0N200D0" > base14-font="TimesRoman"/> > > <afp-raster-font size="16" characterset="C0N200F0" > base14-font="TimesRoman"/> > > <afp-raster-font size="18" characterset="C0N200H0" > base14-font="TimesRoman"/> > > <afp-raster-font size="20" characterset="C0N200J0" > base14-font="TimesRoman"/> > > <afp-raster-font size="24" characterset="C0N200N0" > base14-font="TimesRoman"/> > > <afp-raster-font size="30" characterset="C0N200T0" > base14-font="TimesRoman"/> > > <afp-raster-font size="36" characterset="C0N200Z0" > base14-font="TimesRoman"/> > > </afp-font> > > <font-triplet name="ocrb10" style="normal" weight="normal"/> > > <font-triplet name="ocrb" style="normal" weight="normal"/> > > </font> > > > > -> This doesn't really works :) > > > > The name of the codepage 'T1E00877' I'm using here I have found on an IBM > Documentation: > > http://www-01.ibm.com/common/ssi/cgi-bin/ssialias?infotype=AN&subtype=CA&htmlfid=877/ENUSZP02-0594&appname=printers > > > > I'm absolutely unsure how to continue with this. > > Can I map OCR-B as a raster font? Is it a raster font? > > How do I find the correct character set? Is 'T1E00877' the correct codepage? > > I'm using the OCR font in 3 sizes: 9.5pt, 10pt and 11pt. > > > > Please, it's very difficult to find information about this topic. Hundreds > of documents but I found anything helpful. > > > > I would really appreciate to get a solution for this. > > And much better if I understand how font mapping really works. :) > > > > Regars > > Peter --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
