Font for OCR Reader using Apache FOP and XSLT.

Hello,
I have to use one of the following fonts to render a line on a PDF that an OCR reader can read.
"OCR-A (extended)" or "OCR-B" font Or  "Farrington 7B" font.

1) Does any of the font mentioned below is available for use? (I am using a Apache FOP and XSLT to transform the document into PDF.)
2) If so can you please provide a sample or any setting that need to be made for this to work.

I hope my question makes sense, please let me know if not.

Thanks,
jdharshaAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Geert BormansConnect With a Mentor Information ArchitectCommented:
If you call the fop class from java, there also is a property for pointing to the config
0
 
Geert BormansInformation ArchitectCommented:
0
 
Geert BormansInformation ArchitectCommented:
I am not sure that one would has all characters you might possibly need,
but is a very good one for errorless OCR
0
[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

 
jdharshaAuthor Commented:
Geert,
Thanks for the info, I've already visited that link and have the font file with me but not sure how I can add/integrate the file to be used with Apache FOP?
Thanks,
0
 
Geert BormansInformation ArchitectCommented:
Here is how to configure fop for a new font

https://xmlgraphics.apache.org/fop/0.95/configuration.html

<!-- Font Base URL for resolving relative font URLs -->
  <font-base>./</font-base>
add the absolute path to your font files here

and add the font here
    <fonts>
      <font embed-url="ocr-a.ttf">
        <font-triplet name="OCRA" style="normal" weight="normal"/>
      </font>
provided ocr-a.ttf is the font file you downloaded, normal styled, normal weighted fonts using font-family="OCRA" will use that font file
0
 
Geert BormansInformation ArchitectCommented:
fop uses a default configuration I believe
from the command line it is easy to point to your specific config file,
"-d" from the top of my had, but not sure
0
 
Geert BormansInformation ArchitectCommented:
almost not "-d" but "-c"

•If running FOP from the command-line, see the "-c" command-line option in Running FOP.
0
 
jdharshaAuthor Commented:
Thanks much!
0
All Courses

From novice to tech pro — start learning today.