Before going down this road ask yourself it it is posible to either convert a .pdf into what you want or to use .pdf instead. It's going to be a lot simpler if you can. See Section 4 on file format conversion for more information.
Well if you must scan into something other that .pdf, then you'll need to use the scanadf command. The scanadf command produces a file for each page in your stack of documents. Those files will be in .pnm format, which though seldom used, is easily converted into just about anything via a pnmto-whatever command. See Section 4.3.1 for information on the netpbm pakage, which allows you to convert .pnm files to all sorts of other types.