def getDimension(self): width = HWPUNIT(self.paper_width - self.offsetLeft - self.offsetRight) height = HWPUNIT(self.paper_height - (self.offsetTop + self.offsetHeader) - (self.offsetBottom + self.offsetFooter)) if self.attr.landscape: return (height, width) else: return (width, height)
def getWidth(self): if self.attr.landscape: height = HWPUNIT(self.paper_height - (self.offsetTop + self.offsetHeader) - (self.offsetBottom + self.offsetFooter)) return height else: width = HWPUNIT(self.paper_width - self.offsetLeft - self.offsetRight) return width