i've worked some with vfp, and based on my experience, i would guess that vfp cannot open and extract PDF files text. If however you have access to vis.basic, it's not much of a problem. the vis.basic program can be made into a .EXE, and vfp can run it via the ! operation. here's vis.basic core code needed: shell ("notepad"),1 shell ("start xxxxx.pdf"),1 'foll is a "wait n seconds" routine set for "g" seconds g=20 gosub wait appactivate "Acrobat Reader -" 'alt-E, S select-all, ctl-c sendkeys "%E",true sendkeys "S",true sendkeys "^C",true appactivate "Untitled - Notepad" 'ctl-v paste, alt-F, A saveAs, close notepad sendkeys "^V",true sendkeys "%f",true sendkeys "a",true sendkeys "\sykoPath\testfil.txt" sendkeys "%{F4}",true 'end vbasic program end wait: t1=timer mod g for i=1 to 2000 doevents next i t2=abs((timer mod g)-t1) if t2=o then return goto wait i know this is one more step, and vis.basic window manipulation can be funky (very slow loads, other windows interrupting, etc). Only way I know of to get from PDF to text without paying a bunch of dollars to adobe (they do offer the programs to do these kinds of things, impor/export).
|