IMHO it looks like the custom page_width, page_height elements weren't getting passed to the render method in the PageDef module. My solution was to create a method in Template.pm which returned the custome width/height. Probably not the best solution, but it works for me.