Solved

Font for OCR Reader using Apache FOP and XSLT.

Posted on 2015-01-21
8
181 Views
Last Modified: 2015-01-22
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,
0
Comment
Question by:jdharsha
  • 6
  • 2
8 Comments
 
LVL 60

Expert Comment

by:Geert Bormans
ID: 40563057
0
 
LVL 60

Expert Comment

by:Geert Bormans
ID: 40563059
I am not sure that one would has all characters you might possibly need,
but is a very good one for errorless OCR
0
 

Author Comment

by:jdharsha
ID: 40563066
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
How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

 
LVL 60

Expert Comment

by:Geert Bormans
ID: 40563071
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
 
LVL 60

Expert Comment

by:Geert Bormans
ID: 40563073
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
 
LVL 60

Expert Comment

by:Geert Bormans
ID: 40563075
almost not "-d" but "-c"

•If running FOP from the command-line, see the "-c" command-line option in Running FOP.
0
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 500 total points
ID: 40563077
If you call the fop class from java, there also is a property for pointing to the config
0
 

Author Closing Comment

by:jdharsha
ID: 40564615
Thanks much!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question