There is no possible "correct" solution for this.
Since it's code, it can't be automatically wrapped, because it breaks[1].
In rst2pdf I offer a "shrink" fit where the font size is decreased until it
fits the page, but it's not meant for production usage (you can end with
completely unreadable blocks!)
So, I expect the answer is "yes, you need to format it by hand".
And the really bad news: you probably need to format it by hand again for
printing, if you want to print.
[1] Ok, if you know the language you *could* wrap it in some cases. But in
arbitrary code blocks you don't.
--
("\''/").__..-''"`-. . Roberto Alsina
`9_ 9 ) `-. ( ).`-._.`) KDE Developer (MFCH)
(_Y_.)' ._ ) `._`. " -.-' http://lateral.netmanagers.com.ar
_..`-'_..-_/ /-'_.' The 6,855th most popular site of Slovenia
(l)-'' ((i).' ((!.' according to alexa.com (27/5/2007)
It's just a matter of CSS. Probably you want to use something like pre-wrap
and overflow-visible.
http://www.w3schools.com/Css/pr_pos_overflow.asp
http://www.w3schools.com/CSS/pr_text_white-space.asp