https://github.com/modesty/p2jsvc
A RESTful web service adaptor for pdf2json, built with restify and nodejs.
https://github.com/modesty/p2jsvc
Last synced: 12 months ago
JSON representation
A RESTful web service adaptor for pdf2json, built with restify and nodejs.
- Host: GitHub
- URL: https://github.com/modesty/p2jsvc
- Owner: modesty
- License: mit
- Created: 2013-04-02T22:21:12.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2022-04-11T19:30:28.000Z (about 4 years ago)
- Last Synced: 2025-04-12T13:59:19.745Z (about 1 year ago)
- Language: JavaScript
- Size: 24.7 MB
- Stars: 33
- Watchers: 5
- Forks: 18
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: license.txt
Awesome Lists containing this project
README
p2jsvc
======
A RESTful web service adaptor for [pdf2json](https://github.com/modesty/pdf2json), built with restify and nodejs.
##Installation
git clone https://github.com/modesty/p2jsvc
cd p2jsvc
npm install
##Start the Server
cd p2jsvc
node index
You should see '[time_stamp] - PDFFORMServer1 listening at http://0.0.0.0:8001' in termial window.
##Service Status Check
curl -isv http://0.0.0.0:8001/p2jsvc/status
Response should include something like this:
{"status":{"code":200,"message":"OK","fieldName":"PDFFORMServer1"}}
##Test with GET
curl -isv http://0.0.0.0:8001/p2jsvc/data/xfa_1040ez
curl -isv http://0.0.0.0:8001/p2jsvc/data/xfa_1040a
curl -isv http://0.0.0.0:8001/p2jsvc/data/xfa_1040
##Test with POST
curl -isv -H "Content-Type: application/json" -X POST -d '{"folderName":"data", "pdfId":"xfa_1040ez"}' http://0.0.0.0:8001/p2jsvc
curl -isv -H "Content-Type: application/json" -X POST -d '{"folderName":"data", "pdfId":"xfa_1040a"}' http://0.0.0.0:8001/p2jsvc
curl -isv -H "Content-Type: application/json" -X POST -d '{"folderName":"data", "pdfId":"xfa_1040"}' http://0.0.0.0:8001/p2jsvc
##Concurrency Benchmark Test
ab -n 10 -c 10 http://0.0.0.0:8001/p2jsvc/data/xfa_1040ez
ab -n 10 -c 10 http://0.0.0.0:8001/p2jsvc/data/xfa_1040a
ab -n 10 -c 10 http://0.0.0.0:8001/p2jsvc/data/xfa_1040
##More Info
[Restful Web Service for PDF2JSON](http://www.codeproject.com/Articles/573297/Restful-Web-Service-for-PDF2JSON)