Skip to content

Instantly share code, notes, and snippets.

@go4Mor4
Created June 5, 2020 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save go4Mor4/246b56f20f564dac41a8f993f1819aed to your computer and use it in GitHub Desktop.
Save go4Mor4/246b56f20f564dac41a8f993f1819aed to your computer and use it in GitHub Desktop.
def pdf_to_images(PATH_PDF, DIR_OUTPUT):
images, count = convert_from_path(PATH_PDF, poppler_path= r'C:\Program Files (x86)\poppler-0.68.0\bin'), 1
for image in images:
image.save(rf'{DIR_OUTPUT}teste ({count}).png', 'PNG')
count += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment