is there any open-source library that can handle this well which support utf-8?

i know for java there is a 'jasper report' that can write xml tag to format a beautiful report printing which the developer no need to care about those 'header' or 'footer' drawing stuff himself