jdharsha
asked on
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,
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,
http://fontzone.net/font-details/ocr-a-extended
I am not sure that one would has all characters you might possibly need,
but is a very good one for errorless OCR
but is a very good one for errorless OCR
ASKER
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,
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,
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
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
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
from the command line it is easy to point to your specific config file,
"-d" from the top of my had, but not sure
almost not "-d" but "-c"
•If running FOP from the command-line, see the "-c" command-line option in Running FOP.
•If running FOP from the command-line, see the "-c" command-line option in Running FOP.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks much!