Solved

Font for OCR Reader using Apache FOP and XSLT.

Posted on 2015-01-21
8
168 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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

I made this because I wanted to get e-mail with a attached csv file so I'd would be able to import user input into a MS Excel template, but I also wanted to register/save all inputs from each day in a file on the server. 1st - It creates a temp C…
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now