Sane (Scanner Access Now Easy) is the program to get the scanner support in linux. http://www.sane-project.org/sane-supported-devices.html gives the list of supported devices.
For HP usb devices install the hplip (HP Linux Imaging Printing) support package and start: hp-toolbox
For Gentoo Linux: Consider to set the usb and scanner useflag.
Sane has a back end dealing with the hardware so install it sane-backends.
For usb scanners check what has been detected lsusb or usbview and then to have sane find the scanner
sane-find-scanner
found possible USB scanner (vendor=0x03f0 [HP], product=0x0f54 [OfficeJet 6950]) at libusb:001:003
To see if it is supported:
scanimage -L
device `hp3500:libusb:005:003' is a Hewlett-Packard ScanJet 3500 scanner
Important to know is `hp3500:libusb:005:003' the name of the scanner.
scanimage -d hp3500:libusb:005:003 > image.pnm will scan.
Now get a sane frontend as xsane or the simple sane-frontends providing xscanimage.
The frontends have options as enable ocr or gimp integration (For Gentoo set those useflags).
Multipage scanning in xsane is not very intuitive
Select (maximum) number of pages and multipage. Set a directory where all individual files go. If the scanner has a Automatic Document Feeder select ADF. Then scan it. Individual image-xxxx files are created. When done press "Save multipage file" and the file will not be in the multipage directory but one directory above.
It can happen that xsane does not show the preview Window. In this case delete ~/.sane/xsane