<big_grin>

I think that first you should Ask the Dark Gods. Certanly that will help.

Make sure to ask them exactly what you've asked us: Take a number from you, convert it to an OCR font, put it in a PDF file, print it out, run the printout through an OCR scanner, and give your number back to you.

If the Dark Gods can't help, purchase some good OCR software and PDF authoring software. It's too much work to reinvent that wheel from scratch.

</big_grin>

Seriously though, the problems are that your specification is unclear, and Perl isn't the best tool for this particular job. OCR interpretation is a "Big Job", and most of the companies that specialize in it charge for their software. ...and I've yet to see flawless OCR that can handle more than a very limited type of input.

Some suggestions have been offered. But honestly, I think you're probably either going about it the wrong way, or trying to crack too big of a nut, or both. If serious OCR conversion is your goal, you're better off paying a couple hundred dollars for a well-developed tool. As mentioned before, the fact that there is virtually nothing on CPAN for OCR (and yet OCR is such a well-known task), should be a strong indicator that in this case, home-made Perl scripting isn't your solution. But maybe I've simply not understood what you're trying to accomplish.

Update: <big_grin> tags added.


In reply to Re: Re: Re: OCR Code by davido
in thread OCR Code by tbabu

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.