@eyedea-sockets/pdf

0.1.4 • Public • Published

Syncano Socket for generating PDF from HTML

Syncano Socket CircleCI branch Codecov branch npm license

Main Socket features:

  • pdf/generate — generate PDF file from HTML

Getting Started

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>

Endpoints

pdf/generate

Input:

Parameter Type Required Example
html string Yes <h1>Test<h1>
css string Yes h1 {background-color: lightblue}
filename string Yes output.pdf

Outputs:

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @eyedea-sockets/pdf

Weekly Downloads

2

Version

0.1.4

License

MIT

Unpacked Size

15 kB

Total Files

14

Last publish

Collaborators

  • hzub
  • maciejkorsan
  • idered
  • qk