pdfparser
pdfparser copied to clipboard
How to get the page numbers that certain a given text?
I dont' know if there is already this function. Is it possible to find a text like "TEST-STRING" and return all page numbers where this string is found? Thanks
I dont' know if there is already this function.
Not to my knowledge.
You could try the following though:
- load PDF in the parser
- go through each page and check for your text (and remember the ones which match)
I solved using another old package: https://github.com/christian-vigh-phpclasses/PdfToText maybe it is possible to implement it inside yours. There is a method that return an array of all page numbers where the string is found.