I want to use Python Slate module for PDF text extraction, and I have my code up and running for this. What I would like to know here is how to link my existing PHP MVC to utilize/make a request to Python slate Script for PDF extarction. The option I thought of are :
-
Using PHP
shell_execorpassthruorexeccommand fromPhpscript to call python script(Slate/PDF MINER) , with the desired pdf file path. -
Or Making PHP to interact with Python Django/DRF (where the Slate script will reside). More precise may be an API call (
RESTFULarchitecture) to DRF. -
Or may be running a single python script on
wscgiwhich can be called byphpscript.
This three options coming in my mind, and I want to keep things simple here.
Is their any other better option or better way to achieve this ? Please give me your feedback.