'Returns the current content of the document as a string.'

def getvalue(self):

    if self.hrefs:
        self.style.new_paragraph()
        for (refname, link) in self.hrefs.items():
            self.style.link_target_definition(refname, link)
    return ''.join(self._writes).encode('utf-8')
