Unfortunately, there is a lot of JS going on (mathjax), so the PDFs are generated before it is complete.
Resulting in half of the math in the book not being correct.
In your Phantomjs script, you should not just export the current page directly, you should wait until everything is rendered.
Try to identify a CSS selector to watch that is satisfied only when the rendering is finished.