• Print

BookJS turns your browser into a print typesetting engine

The design of books and paper products enters a networked environment

I mentioned in an earlier post that the movable type of Gutenberg’s time has become realtime, in a very real sense each book is typeset as we read it. Content is dynamically re-flowed for each device depending on display dimensions and individualized settings. Since ebooks are webpages, browsers have come to play a central role in digital ereaders.

What is interesting here is that the browser can also reflow content into fixed page formats like PDF which means that the browser is on its way to becoming the typesetting engine for print. BookJS demonstrates nicely the role of the browser as print typesetting engine.

BookJS is a Javascript library that you can use to turn a webpage into a PDF formatted for printing as a book. Take a webpage, add the Javascript and you will see the page transformed into a paginated book complete with page breaks, margins, page numbers, table of contents, front matter, headers etc. When you print that page you have a book formatted PDF ready to print. It’s that simple.

Plain HTML file with book content

Same file with BookJS applied

A page with an illustration

Illustration of Table of Contents automatically generated by BookJS

Three books produced by the BookJS in-browser typesetting library. Photo by Kristin Tretheway.

It brings us closer to in-browser print design and a step closer to the demise of Desktop Publishing. Although BookJS is in alpha form it is a clear demonstration that the browser is fast becoming the new environment for print design.

That is an enormous leap. One that not only means print design environments can be developed using browser based technology, which will surely lead to enormous innovation, but it radically changes the process of design. The design of books and paper products enters a networked environment. This will enable more possibilities for collaborative design and bring print production into the workflow of online content production. There will be no need to exit browser-based environments to take content from source to final output. This means there is no need to juggle multiple sources for different stages of production, there can be efficiency gains through integrated workflow, and, most interestingly, content production and design can occur simultaneously…

It is also important to realize that these same technologies, BookJS and others that will follow it, can make the same things possible for ebook production. Flowing text into PDF for paper book, or into ereader screen display dimensions, is the same thing. This enables synchronous in-browser design and production on a single source for multiple output formats.

BookJS is Open Source, developed originally by and for Booktype, but the team is looking to collaborate with whoever would like to push this code base further. It is at the alpha stage and a lot of work still needs to be done so please consider jumping in, improving the code and contributing back into the public repository.

BookJS demo and information can be found here : http://bookjs.net

Note: This is strictly for the geeks to try as it requires the latest version of Chrome; see the demo information.

tags: ,
  • http://www.facebook.com/joshua.carpenter.9828 Joshua Carpenter

    It’s great, I buy many books and other online release, I recommend it to everyone, it is very safe and cheaper. Fair enough there a tool or something like this to print the ebooks, because it’s true, when you want to print an ebook, is never the way you want.
    Regards,
    Joshua – Vudu

  • bowerbird

    ok, this is good.  but now you need to eliminate the need for .html markup.

    so people can use plain-text.  _then_ what you have will be revolutionary…

    if your workflow requires .html markup, use a form of light-markup to get it.
    markdown is one system that you have probably heard of.  so check it out.

    or, you know, if you like, you can use my z.m.l.

    because, for many years now, i’ve been proposing (and researching,
    and _doing_) the exact set of things which you are now headed toward.

    -bowerbird

  • http://blog.booki.cc adam hyde

    Thanks Bowerbird. I believe HTML is the paper of our time (with BookJS almost literally so), it is certainly the networked document of our time, and it is easier to produce html than any other format these days. So, Im not sure I agree with you but if you disagree feel free to take BookJS and make it work with the markdown of your choice. Should be simple enough.

  • bowerbird

    adam said:
    >   I believe HTML is the paper of our time

    anybody can use paper, with zero training,
    including a child with a _crayon_, whereas
    .html takes a lot of training, especially when
    it’s the specialized type used in your system.

    so i’m inclined to be skeptical of that position.

    >   it is easier to produce html 
    >   than any other format these days

    whether or not that might be true “these days”,
    i can certainly imagine a “new” system that can
    take a pile of unformatted content thrown at it,
    ascertain the basic structure underlying the pile,
    and then display all of that content appropriately.

    then, in the places where that system was “off”,
    one could apply a smidgen of a hint that would
    alter the analysis of that pile to make it correct,
    such that the degree of work needed to produce
    the correctly-formatted output was truly minimal.

    and when such a system becomes commonplace,
    browsers won’t bother to require .html any more.

    or, because the purpose of a browser is precisely
    to interpret .html, then it is entirely possible that
    we’ll end up with a _new_ app to display content.

    i certainly don’t think that the browser/html duo
    is the most highly-evolved state we can attain…

    >   if you disagree feel free to take BookJS and 
    >   make it work with the markdown of your choice.

    i admire what you’ve done.  greatly.

    you took this far past what anyone else has done.

    so thanks for the offer.

    but i’ve written my own code, thank you, and
    i’ll be using that…

    -bowerbird

  • http://blog.booki.cc adam hyde

    i agree with you that the browser and html is not the most highly evolved state…but neither is paper…and look how far that got us…

  • bowerbird

    adam said:
    >   look how far that got us…

    true. so true.  so you run with the html/browser duo,
    and i will run with the next iteration, and we will see
    how far our respective approaches get us.  good luck.

    -bowerbird

    • http://blog.booki.cc adam hyde

      yep, the more the merrier! Good luck Bowerbird, very nice discussion.

      • bowerbird

        we could have a much more productive discussion,
        but i’m allergic to the o’reilly blog here…

        if you wanna talk, e-mail me at bowerbird at aol dot com.

        -bowerbird

        • http://blog.booki.cc adam hyde

          ok, will do :)