Created
May 16, 2014 18:40
-
-
Save AABoyles/82ad0ba2d455ab8f5d6a to your computer and use it in GitHub Desktop.
pdf2txt.py - Requires the Slate Library (https://github.com/timClicks/slate)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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