I'm trying to extract text from a PDF using PDFminer.six, is there a way to find all instances of a certain phrase appearing in that string. I know a way to find the phrases and remove them but I can't seem to save the text around the phrase to a variable or list. Is there an easy way to do this that I've overlooked?
from pdfminer.high_level import extract_text
text = extract_text('Pdf Scanner/test.pdf')
textf = text.find("vejkode")
print(len(text))
This is what I have so far.