Skip to content

Instantly share code, notes, and snippets.

@yatesconsulting
yatesconsulting / parsepdf.py
Created May 19, 2021 14:21 — forked from gchristian/parsepdf.py
parse pdf into smaller pdfs based on key value
#separate pdf based on a phrase that can be used to delineate break points and names files by first word after that break point
import PyPDF2
import pdfplumber
if __name__ == '__main__':
pdf_path = 'MBA Report Creator.pdf'
pdf_break_point = 'Student_Number '
base_pdf = PyPDF2.PdfFileReader(pdf_path)
new_pdf = PyPDF2.PdfFileWriter()