Consider installing gitbook-pdf
gitbook-pdf uses PhantomJS and rasterize.js to build PDF files from HTML
You would require NodeJS and NPM
After installing run commands:
gitbook-pdf --format A4 generate index.html index.pdf
A4 is the default paper format..there are other options too! check it out
index.html is your main HTML file
index.pdf is your final product
Hope that helps!