I have been trying to convert a pdf to an image and display on a tkinter canvas. I have it working but every time i convert a pdf i get this error(I borrowed this code from here (PDF Viewer for Python Tkinter). Is there anyway to just set it to 300DPI? or better yet why is this happening and what can i do about it? I have searched for hours trying to find other convert pdf to image solutions and came up with nothing I could figure out easily(I am quite new to python).
pypdfocr issue: 'pdfimages' is not recognized as an internal or external command, operable program or batch file. WARNING: Could not execute pdfimages to calculate DPI (try installing xpdf or poppler?), so defaulting to 300dpi
import pypdfocr.pypdfocr_gs as pdfImg
from PIL import Image, ImageTk
import Tkinter as tk
import ttk
import glob, os
root=tk.Tk()
__f_tmp = glob.glob(pdfImg.PyGs({}).make_img_from_pdf("1.pdf")[1])[0]
# ^ this is needed for an "default"-Config
__img=Image.open(__f_tmp)
__tk_img = ImageTk.PhotoImage(__img.resize((800,1000), Image.ANTIALIAS))
ttk.Label(root, image=__tk_img).grid()
__img.close()
os.remove(__f_tmp)
root.mainloop()