Quantcast
Channel: Question and Answer » web-services
Viewing all articles
Browse latest Browse all 136

Utilizing Python Slate for pdf text extraction from PHP

$
0
0

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 :

  1. Using PHP shell_exec or passthru or exec command from Php script to call python script(Slate/PDF MINER) , with the desired pdf file path.

  2. Or Making PHP to interact with Python Django/DRF (where the Slate script will reside). More precise may be an API call (RESTFUL architecture) to DRF.

  3. Or may be running a single python script on wscgi which can be called by php script.

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.


Viewing all articles
Browse latest Browse all 136