code: def pdf_to_img(self, page_num, pdf_dim=None):
          
          if not pdf_dim:
              pdf_dim = get_pdf_dim(self.pdf_file)
          page_width, page_height = pdf_dim
          img = Image(filename="{}[{}]".format(self.pdf_file, page_num - 1))
          img.resize(page_width, page_height)
          return img
docs: Converts pdf file into image
          :param pdf_file: path to the pdf file
          :param page_num: page number to convert (index starting at 1)
          :return: wand image object