You can use Parsr in different ways:
- Using the command line
- Using the API
- Using the demo web viewer
Inside the Parsr folder (where it has been installed), launch:
npm install
The tool contains a pipeline of modules that process the document step by step and is highly configurable. To change it's default configuration, please refer to the configuration file documentation.
To start the web viewer demo, simply run:
npm run start:web:vue
In two different terminals, first:
npm run start:api
then in the other one:
cd demo/vue-viewer && npm install && npm run serve
Open localhost:8080 with your favorite browser to use the GUI.
For an explanation on how to use the web viewer demo, refer to the GUI Usage Guide.
-f, --input-file <filename> // Input file to be processed.
-o, --output-folder <foldername> // Location of the folder where the output will be stored.
-n, --document-name <name> // Name of the document.
-c, --config <filename> // The file's path from which the application's parameters will be loaded.
-l, --log-level <verbosity> // Verbosity level: debug, info (default), warn, error.
-p, --pretty-logs // Make logs look pretty but unreadable for a machine.
Under Mac OS X, Linux:
npm run run:debug -- --input-file samples/t1.pdf --output-folder dist/ --document-name example --config server/defaultConfig.json --pretty-logs
Under Windows:
cmd /C "npm run run:debug -- --input-file samples/t1.pdf --output-folder samples --document-name example --config server/defaultConfig.json --pretty-logs"
Install the API server with:
npm run install:api
And then start the API server with:
npm run start:api
You can then call endpoints on localhost:3001.
The documentation for the API can be found here.
npm run test