Skip to content

adamschwartz/worker-generate-invoice-pdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Generate an Invoice PDF using Cloudflare Workers

Direct PDF generation

Visit https://generate.invoice.workers.dev to view a PDF generated with all of the default input values.

To customize, set query params company, customer, description, amount, and total:

https://generate.invoice.workers.dev/
  ?company=Ginza Natsuno \n4F Marunouchi 1-5-1 \nChiyoda-ku, Tokyo, Japan
  &customer=Sukiyabashi Jiro \n2-15, Ginza 4-chome \nCity Chuo, Tokyo, Japan
  &description=4 pairs of rounded red sandalwood chopsticks
  &amount=4 × ¥8,000 per pair
  &total=¥32,000

View example PDF

Website

You can also generate a PDF using a UI by visiting lazy.invoice.workers.dev, for which this backend Cloudflare Worker script was built.

Customizing this project

This project uses the Workers CLI in order to build and publish your script to Cloudflare Workers.

To customize this project for your own purposes, follow these steps:

  1. Install the Workers CLI.
  2. Clone the repo into a new directory.
  3. Follow the Workers configuration instructions to configure the CLI. Essentially this amounts to running one Workers CLI command and then editing the wrangler.toml file in this project with your Cloudflare Account ID and the secondary subdomain of your choosing for deployment.

License

MIT

About

Generate an invoice PDF on the fly with Cloudflare Workers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages