Paged.js — Handlers, Hooks and custom javascript

You’re now fluent in paged media specs, that quite awesome :). But you may want to do more with the scripts. Here is how you can update some of the script to do what you’d like to do.

This is a companion discussion topic for the original entry at

I’ve been trying to work out how to make sure that my back page prints on the back page of a booklet. I’ve mashed together a solution and documented it as a Q&A on stack overflow.

There’s a lot that I don’t understand about how handlers work, and about what the breakToken does. I’m fairly sure that there’s a more elegant way to solve this problem, but I don’t know where to look for docs. Do you have any suggestions on how to achieve this, or is it how you’d go about it too?