Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Font for OCR Reader using Apache FOP and XSLT.

Posted on 2015-01-21
8
Medium Priority
?
227 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Stressed Out?

Watch some penguins on the livecam!

 
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 1500 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

Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

Question has a verified solution.

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

Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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…

671 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