You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
342 B
20 lines
342 B
6 months ago
|
# import modules I need
|
||
|
import pdftotext
|
||
|
import sys
|
||
|
|
||
|
# open the pdf
|
||
|
infile = open(sys.argv[1], "rb")
|
||
|
|
||
|
# convert it to text
|
||
|
pdf = pdftotext.PDF(infile)
|
||
|
|
||
|
lines = "".join(pdf).split("\n")
|
||
|
|
||
|
# find Reporting Period
|
||
|
for line in lines:
|
||
|
if line.startswith("Reporting Period"):
|
||
|
# print it
|
||
|
print(line)
|
||
|
else:
|
||
|
print(line)
|