0.2.2 • Published 8 months ago

aws-lambda-pdf v0.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

AWS Lambda PDF

An AWS Lambda function that will accept HTML as its input and return a PDF.

Installation

npm i aws-lambda-pdf

Usage

We'll be using Serverless to deploy the function, so make sure you set up AWS credentials first.

Create a serverless.yml file in the same folder as your package.json where you installed aws-lambda-pdf, then run:

npx serverless deploy

Test

This will produce a PDF with the text "Hello world" in it:

curl https://replace-with-your-url.execute-api.us-east-1.amazonaws.com/dev/pdf \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/pdf' \
  --data-raw $'{"html":"<html><body><p>Hello world</p></body></html>"}' \
  --output hello-world.pdf
0.2.2

8 months ago

0.2.1

8 months ago

0.2.0

8 months ago

0.1.0

8 months ago

0.0.4

8 months ago