Search pdf and extract page when found
Does anyone know how to search through a multiple page pdf for some text (e.g., an invoice number) and then extract that page to a separate file? I see how I can use FPDI to extract a particular page and then use FPDF to modify and save. The part I can't figure out is how to search the pdf and determine the page number that text is on. T开发者_开发问答his would preferably be done with php, but I'd be willing to use something else if necessary.
Are there any suggestions?
Thank you.
This page helped me find a solution:
http://www.freak-search.com/en/thread/2817957/find_page_number_containing_a_given_text
Basically, you use the command line program "pdftotext" in a bash script (see the link) to return the page number and then FPDI to extract the page. Works great.
精彩评论