I am able to convert pdf file in my drive to images using pdf2image convert_to_path but when I try the same for pdf 'https://example.com/abc.pdf', end up with multiple errors.
Code:
url = 'https://example.com/abc.pdf'
scrape = urlopen(url) # for external files
pil_images = pdf2image.convert_from_bytes(scrape.read(), dpi=200,
output_folder=None, first_page=None, last_page=None,
thread_count=1, userpw=None,use_cropbox=False, strict=False,
poppler_path=r"C:\poppler-0.68.0_x86\poppler-0.68.0\bin",)
Error:
Unable to get page count. Syntax Error: Document stream is empty
Followed below link as well but no luck
Python3: Download PDF to memory and convert first page to image
Screenshot for Authentication: