gocr.exe -C 0-9 towant.pnm ; only char from 0 to 9
gocr.exe -m 130 toknow.pnm ; set database (2+128)
gocr.exe -m 2 towant.pnm ; use database
gocr.exe -a 100 towant.pnm ; no error (perfect for computer font if complet db )
However GOCR have limit, the image conversion is a problem with windows : executable are rare or don't take alpha channel, pnm is the "open" bmp, but depends of your original file type... so they are some image processing to do, and sometime reshape/format a character with a good understand of pnm format (ascii to binary, select color chanel for basic captcha, db only use .pbm(no gray), 2 character can be merged , ... )
so my advice is to use gocr for "code number" or computer font, BUT gocr is still in work

edit: you can use gocr as this too (gocr.exe - "minus alone" use the stdin/out , can be good if no image processing to do and fast result requiered)
xxx2pnm.exe root.xxx | gocr.exe - > result.txt