The first thing you will have to do is get the source code – after all the books are open source licensed and freely available to anyone. The books are found on github at http://github.com/sonatype/ and in the case of the reference book at http://github.com/sonatype/maven-reference-en. With the excellent help on github you can just fork the repository and get your own copy going locally. My copy for example is at http://github.com/mosabua/maven-reference-en

Now thanks to the power of Maven and its conventions you get the book created as HTML website and PDF document by running, surprise, mvn clean install