'Set printer settings'

def set_printer_settings(self, paper_size, orientation):

    self.page_setup.paperSize = paper_size
    if (orientation not in (self.ORIENTATION_PORTRAIT, self.ORIENTATION_LANDSCAPE)):
        raise ValueError(('Values    should    be    %s    or    %s' % (self.ORIENTATION_PORTRAIT, self.ORIENTATION_LANDSCAPE)))
    self.page_setup.orientation = orientation
