I would like to know if there is mac version of linux command line tool pdftotext?
You can grab a Mac version from Softpedia.
The current version 3.02pl1 is here: http://users.phg-online.de/tk/MOSXS/ (a little further down the page).
Softpedia is too old
Yes!! you can try directly from there site
Xpdf: Mac 32/64-bit: download (GPG signature)
or install via brew
brew cask install pdftotext
brew install xpdf