Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find text in pdf file
Message
 
À
21/11/2003 09:16:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00852282
Message ID:
00852427
Vues:
17
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform