Welcome to the printing project page. Printing in WebKit is closely tied to the layout and rendering code. When you print in WebKit, the existing render tree is converted into a new render tree with print styles applied. That new render tree then gets a layout. The big flaw in WebKit's printing architecture right now is that page breaks are determined at a simulated "paint" time rather than during layout itself. This means that at best all you can hope to do is try to find an optimal position for a break without altering the layout of the Web document at all.