As long as you obtain the books legally then it's legal
This really isn't that hard
For the rest of us, we understand context