Created
September 16, 2014 17:09
-
-
Save RC1140/d0008fab2ed0d01859ef to your computer and use it in GitHub Desktop.
splitDocument.py
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
from PyPDF2 import PdfFileWriter, PdfFileReader | |
input1 = PdfFileReader(open("fileToSplit.pdf", "rb")) | |
for i in range(input1.numPages): | |
output = PdfFileWriter() | |
output.addPage(input1.getPage(i)) | |
outputStream = file('review'+i.__str__()+'.pdf', "wb") | |
output.write(outputStream) | |
outputStream.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment