views:

23

answers:

0

Hi,

Can anyone tell me how to put footer only on last page using reportlab? I am able to put footer on every page, but i want it only on last page.

Below is my code,

def beforeDrawPage(self, canv, doc):
    "Decorate the page with an asymetric design"
    #canv.setFillColor(colors.orange)
    productpath = os.path.dirname(config.__file__)
    imagepath = os.path.join(productpath, 'pdf')
    canv.drawRightString(435,810,"by TELEFAX")
    canv.drawRightString(470,795,"No. (65) 6284 8794")
    canv.drawImage(ImageReader(os.path.join(imagepath, "interlift.jpg")),45, 740,505, height=50) 
    canv.drawImage(ImageReader(os.path.join(imagepath, "footer.jpg")),45, 40,505, height=50) 
    canv.setFont("Helvetica",100)

Regards, Sunny.