'Method to convert the HTML generated for a rHeader into PDF'

def extractrHeader(self, rHeader):

    try:
        repr = self.r.representation
        self.r.representation = 'html'
        html = rHeader(self.r)
        self.r.representation = repr
    except:
        html = rHeader
    parser = S3html2pdf(pageWidth=self.doc.width, exclude_class_list=['tabs'])
    result = parser.parse(html)
    if (result != None):
        self.content += result
