View on GitHub
Download this project as a .zip file Download this project as a tar.gz file

Welcome to the BookJS demo page.

BookJS is a JS lib that can turn a webpage into a formatted Book ready to print to PDF. It is Alpha and available under the AGPL. Developed by the Booktype team for inclusion in any project. There is also a BookJS rendering engine (webkit+BookJS) to create the PDF.

Books made with BookJS | Photo credit Kristin Trethewey

* Join dev list
* git clone
* Issue tracker :
* #booktype

To collaborate on the code contact us over irc or email and let us know what you are doing and what are your thoughts on it. We can talk about the best way to go forward and help you get to know the code base.

To submit a contribution fork the code on github, make changes and send us pull request. If you don't use github (for whatever reason), fork it locally and send us your patch over email or give us access to your repository.


Page headers, footers, numbers, TOC, using CSS Regions

  1. Download a recent version of Chromium/Chrome (23+)
  2. In Chrome/Chromium open a new tab and go to "chrome://flags/"
  3. Search for "Webkit Experimental Features" and enable them
  4. Restart your browser
  5. Read the "Notice" below so you know what to look for and then
  6. Check out this Test Page (takes a few seconds to render due to many images in this example)
  7. As mentioned above there is a BookJS renderer (also Open Source) but for now you can try printing direct to PDF from the browser (set margins to none) although it does not always work as expected
  1. There are multiple numbered "pages"
  2. The TOC is generated from the H1 tags and includes the page number the tag occurs on, for further configuration options, check the sourcefile book.js and an example for how configuration is done in book-config.js.