It is illegal to even scan and copy a book you legally own, usually.
Always consult the copyright page of the book, which states these rules. It is always before the table of contents.
I scan my own textbooks, due to having a print related disability. I go to Kinko's and get the binding cut. Then I sit in front of the scanner and watch movies as I scan the book, page by page on the platen, in 600 DPI (Dots Per Inch). I save on to a flash drive every 10 pages or so. After I am done scanning, I combine the files and I have a full PDF of the book, using Adobe Acrobat Professional. I do not OCR (optical character recognize) the book. If I were to OCR I would use ABBYY Finereader. Scanning the first 100 pages is always grueling.