No need for a third party tool to extract text from a PDF. This script delivered by Shane STANLEY doe the job.
(* text from PDF *)
use AppleScript version "2.4"
use framework "Foundation"
use framework "Quartz"
use scripting additions
on getTextFromPDF:posixPath
set theURL to current
application's |NSURL|'s fileURLWithPath:posixPath
set thePDF to current
application's PDFDocument's alloc()'s initWithURL:theURL
return (thePDF's |string|()) as text
end getTextFromPDF:
its getTextFromPDF:(POSIX
path of (choose
file of type {"pdf"}))
Yvan KOENIG running Sierra 10.12.3 in French (VALLAURIS, France) lundi 6 mars 2017 13:40:51