Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.
/ lambda-wkhtmltopdf Public archive

Convert HTML to PDF using wkhtmltopdf on AWS Lambda

License

Notifications You must be signed in to change notification settings

dimiro1/lambda-wkhtmltopdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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"
}

Output

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

Configuration

  1. Open config.js and set bucket variable to name of S3 bucket where you want function to save output PDF files.
  2. Make sure AWS Lambda function has PutObject access to S3 bucket
  3. Download the binary wkhtmltopdf for linux-x64 and put in the current directory
  4. Run npm install
  5. 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