Main Socket features:
- pdf/generate — generate PDF file from HTML
Install package in your project:
cd my_project
npm install @syncano/cli --save-dev
npm install @eyedea-sockets/pdf --save
npx s deploy
Use it:
wget https://<instanceName>.syncano.site/pdf/generate?html=<h1>Tests</h1>
Parameter | Type | Required | Example |
---|---|---|---|
html | string | Yes | <h1>Test<h1> |
css | string | Yes | h1 {background-color: lightblue} |
filename | string | Yes | output.pdf |
success - Operation Successful
- Code: 200
- Mimetype: application/pdf
PDF file.
fail - Operation failed
- Code: 400
- Mimetype: application/json
Parameter | Type | Description | Example |
---|---|---|---|
message | string | Invitation failed | Internal error. |