Origin probably military. A book soldier
is a person caught up in details and procedures, but lacking in experience and insight. Typically used disparagingly, a book soldier typically is a bureaucrat or official of small import enforcing petty rules that the objects of his/her decision see as virtually meaningless. As a result of, or in compensation for, this focus on minute details, the book soldier secures his or her reputation by being, or described as being, head-smart not street-smart, or educated fool, or drone, lacking empathy and grace.
"Second Lieutenant Johnson" was the classic book soldier: He knew ROTC protocol but nothing about actual warfare, or how to handle a platoon for that matter. If he can't find it in the manual, he freaks out. That's why Sarge calls the shots."
"Jason is a sweet person in real life but at work, in Human Resources, he is a total book soldier. He told me once that one of the staff missed making Employee of the Month because of a two-minute discrepancy between the time clock and the sign-in sheet. I guess in a job like that, it pays to be anal, but fortunately that's not the Jason I usually see."