You could make a tree on a Tk::Canvas widget, then save it as postscript file, then convert to whatever, jpg, png, etc. Of course, it would take a bit of logic to lay out your tree, but you could make it as big as you want, then take the bbox of the canvas when done.
See Data Visualization with Perl Tk.....it's not a tree, but the idea is there.