# PDF Service
-Provides an API interface to generate PDF reports for terms and their sentiment analysis results. The service uses an .NET Core wrapper for the wkhtmltopdf library to generate pdf out of html code.
+Provides a REST-API to generate PDF reports for terms and their sentiment analysis results. The service uses an .NET Core wrapper for the wkhtmltopdf library to generate pdf out of html code.
`GET`: `/` Shows a demo page
- param: none
- return: pdf file
`POST`: `/generatePDF/` Generates a pdf report for the given terms
-- param: Term[] as Content-Type: `application/json`
+- param: Term[] as Content-Type: `application/json`
e.g. body of request
-```javascript
+```json
[
- { "name": "term 1", "sentiment": 0.1 },
- { "name": "term 2", "sentiment": 0.3 },
- { "name": "term 3", "sentiment": 0.7 }
+ {
+ "name": "term 1",
+ "sentiment": 0.1
+ },
+ {
+ "name": "term 2",
+ "sentiment": 0.3
+ },
+ {
+ "name": "term 3",
+ "sentiment": 0.7
+ }
]
```
- return: pdf file
## run with docker
- `docker build -t service-reporting .`
-- `docker run -p YOUR_PORT:80 service-reporting:latest`
+- `docker run -p YOUR_PORT:8083 service-reporting:latest`
## run local
### requirements