Skip to content

A complete application to create PDF files from a HTML form using Node.JS with Typescript. πŸ±β€πŸ

Notifications You must be signed in to change notification settings

dionarodrigues/pdf-generator-nodejs-puppeteer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PDF Generator for business proposals using Node.JS with Puppeteer and HTML

πŸ‘Œ A complete application to create PDF files from a HTML form using Node.JS with Typescript.

Check the PDF demo here.

Animated Circle Text

This project contains the following settings:

πŸš€ Getting Started

Assuming Node.js is installed, run the following commands to install the project:

$ git clone https://github.com/diogorodrigues/node-typescript-starter.git your-project-name

cd your-project-name

rm -rf .git
cd backend
yarn install
yarn dev:server

It is important that you start the backend application before using the HTML form. When filling out the HTML form, the PDF will be downloaded automatically.

Main files

Name Description
app Contains front-end static files: HTML, CSS and JS for the form
app/index.html HTML form
app/assets/js/scripts.js Scripts to handle the form and fetch the API to generate PDFs
backend Contains the Node.JS application to generate PDFs from HTML form
backend/public To storage images and PDFs from the HTML form
backend/src Contains your source code
backend/src/app/templates Contains the hbs templates for PDFs
backend/src/app/controllers Contains the controllers to handle Images and PDFs
backend/src/app/config Contains some configs for multer
backend/src/routes Contains the routes
backend/src/server.ts Entry point to your express app

Eslint + VS Code Settings

  1. Install VS Code ESLint extension
  2. Add the rules below into settings.json (you can do this via the command palette (View > Command Palette, type settings.json and press enter):
"[javascript]": {
    "editor.codeActionsOnSave": {
      "source.fixAll.eslint": true,
    }
  },
  "[javascriptreact]": {
    "editor.codeActionsOnSave": {
      "source.fixAll.eslint": true,
    }
  },
  "[typescript]": {
    "editor.codeActionsOnSave": {
      "source.fixAll.eslint": true,
    }
  },
  "[typescriptreact]": {
    "editor.codeActionsOnSave": {
      "source.fixAll.eslint": true,
    }
  },

About

A complete application to create PDF files from a HTML form using Node.JS with Typescript. πŸ±β€πŸ

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published