View Full Version : Search PDF for String.....


themanof83
10-03-2008, 02:05 AM
Hi all,

I am trying to put together a function that will perform the following function:

1. Search through a PDF and look for the word 'PASS'
2. Return a flag if the words are found and also the number of times they appear.

The main problem is that I'm searching for a word in a PDF file and obviously the word is encoded within the document!!

Thanks in advance.

KenHigg
10-03-2008, 02:23 AM
I'm thinknig you may be able to string together a bunch of 'sendkeys' to do this. I did something similar a long time ago and the details escape me so that's about as much as I can help - :)

georgedwilkinson
10-03-2008, 03:33 AM
Or you can buy a tool that reads PDF files.

nIGHTmAYOR
10-03-2008, 04:54 AM
well it's still easily achieved by sendkeys or manulay :) ,in adobe acrobat, V activates text mode , Ctrl+A selects all text , Ctrl+C copies it , later assigning clipboard to a string or textbox and do whatever via Instr function.(find occurance , add 1 to count variable , start from occurance position + 1 , find another , add another 1 to count variable , blas blas)
hopefully you are talking about latin font though as for other languages the acquired text will contain plenty of rubbish mind you some of the text might be stored in picture format.

themanof83
10-06-2008, 02:47 AM
Any recommendations George??

georgedwilkinson
10-06-2008, 03:54 AM
IRIS, perhaps. I don't really know of many.

I researched IRIS for this recently and they have an API that will allow you to interact with it via your custom program.