I once implemented a pretty printer for generated C++ code based on this paper: Strictly Pretty (
Citeseer). The algorithm is clearly described, and I'm sure that it would be easy to apply to Scheme. (Alas, the references give no credit to earlier pretty printers in Lisp. It's written as if Wadler invented pretty printing.)