Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find text in pdf file
Message
 
To
21/11/2003 09:16:22
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00852282
Message ID:
00852427
Views:
18
See if this meet your needs:
IF ADIR(aa,"c:\*.pdf")<=0
	?"???"
	RETURN
ENDIF

lcfind="yourword"

oShell = CreateObject("WScript.Shell")
FOR ia =1 TO ALEN(aa,1)
	_cliptext=""
	
	oShell.Run("c:\"+aa[ia,1])

	lnsec=SECONDS()
	DO WHILE NOT oShell.AppActivate("Acrobat Reader - ["+aa[ia,1]+"]") and;
			SECONDS()-lnsec <60
		WAIT WINDOW TIMEOUT 1.0 "Open "+aa[ia,1]
	ENDDO
	IF oShell.AppActivate("Acrobat Reader - ["+aa[ia,1]+"]")

		oShell.SendKeys("%ES")	
		oShell.SendKeys("%EC")

		INKEY(5)

		oShell.SendKeys("%FC")  &&close pdf file

	ENDIF

	?aa[ia,1], lcfind$_cliptext
	
ENDFOR

IF oShell.AppActivate("Acrobat Reader")
	oShell.SendKeys("%Fx")
endif

oShell =.null.
>Hi
>
>We want from VFP to be able to find a string in a lot of pdf file. User will put a string in a field to search for and vfp must find all pdf document containing that string. We were thinking about some dll able to do Ole with vfp and able to search in pdf returning information about all the file matching the search.
>
>Any help will be appreciate.
>
>Thanks
>
>Mike
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform