Skip to content

eyedea-io/syncano-socket-pdf

Repository files navigation

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.