Solved

Font for OCR Reader using Apache FOP and XSLT.

Posted on 2015-01-21
8
176 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Tool to email me when a website changes 29 120
jQuery Date picker not working 16 109
Create XML 5 46
JavaScript and Regular Expressions - How to implement date validation? 7 33
Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

867 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

16 Experts available now in Live!

Get 1:1 Help Now