Question: I don't know if this is the right place to ask this question, but...

I need a scanner (paper feed scanner) where depending on either a barcode, or number, or some identifier on the paper being scanned, creates a PDF file with a name based on that identifier.

For example: If I scanned a page with the number 12345 on the top-left of the page, a PDF file named 12345.pdf would be created.

Any suggestions at all would be greatly appreciated!

Answer: 
If you looking for document scanner that has the capability to do batch separation using barcode and rename them base on barcode and zoned OCR you can try to do it with Fujitsu Scanner bundled with its software scan all pro. Other choice is you are using Kodak scanner with kodak capture but the software is sold separately and it quite costly.
If you have an ISIS based scanner you can try Quick Scan Pro software to do it. I have used scan all pro since 3 years ago to digitalized million of pages and it works fine.
This works in Linux for the case of a number at the top of the page. You can play with the scan parameters and the pdf conversion parameters to get what you want (compression, etc).

```
#!/bin/bash
# Requires scanimage, tesseract and ImageMagick convert

# Scan the image to temp file. Change command for your scanner
scanimage -d hpaio:/usb/Deskjet_F4100_series?serial=CN7CH4T29D04TJ \
--mode Lineart --resolution 300 --compression None --format=tiff \
> out.tif

# OCR to tmp.txt file
tesseract out.tif tmp

# Extract first line --contains number (thanks Serverfault 66587)
read -r NUMBER < tmp.txt

# Convert image to pdf with the desired name
convert out.tif $NUMBER.pdf

# Clean up
rm out.tif tmp.txt

```

If you prefer bar codes, then you might try processing the image with 
gocr. It will read some types of bar codes. Extracting the resulting 
number is a bit tricky but can be done with a sed filter.