If you take a leaf out of someone’s book figuratively, it’s all right.
The person whose leaf is thus taken is likely to feel flattered, if he learns of it, because the implied meaning is to imitate, to copy, to ape another person, as in deportment, manner, or method, etc.
But if you do it literally and are caught at it, you run a good chance of running afoul of the law against plagarism.
Nowadays you may not take another man’s book, copy a leaf from it, or even a paragraph from that leaf, and publish it as your own.
You may not even print it without due credit or his (or his publisher’s) written permission.
The penalty can be costly.