Skip to content

Instantly share code, notes, and snippets.

@AABoyles
Created May 16, 2014 18:40
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 AABoyles/82ad0ba2d455ab8f5d6a to your computer and use it in GitHub Desktop.
Save AABoyles/82ad0ba2d455ab8f5d6a to your computer and use it in GitHub Desktop.
pdf2txt.py - Requires the Slate Library (https://github.com/timClicks/slate)
import glob, slate
for filename in glob.glob( '*.pdf' ):
with open(filename) as f:
doc = slate.PDF(f)
fileout = open(filename.rstrip('.pdf')+'.txt', 'w+')
fileout.writelines(doc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment