Skip to content

fasteragile/lambda-wkhtmltopdf

 
 

Repository files navigation

lambda-wkhtmltopdf

Convert HTML to PDF using wkhtmltopdf on AWS Lambda

Input

{
    "data" : "<h1>Claudemiro</h1>",
    "filename": "optional filename",
    "pagesize": "optional pagesize default: a4",
    "bucket": "s3 bucket to use for output"
}

Output

{
    "filename": "8rqj9td0pvjf9a4i.pdf"
}

Configuration

  1. Make sure AWS Lambda function has PutObject access to S3 bucket
  2. Download the binary wkhtmltopdf for linux-x64 and put in the current directory
  3. Run npm install
  4. Zip everything and upload to aws-lambda

Links

About

Convert HTML to PDF using wkhtmltopdf on AWS Lambda

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%