Skip to content

ssxv/node-pdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ab5986e · Jan 25, 2018

History

2 Commits
Jan 25, 2018
Jan 25, 2018
Jan 25, 2018
Jan 25, 2018
Jan 25, 2018
Jan 25, 2018
Jan 25, 2018
Jan 25, 2018

Repository files navigation

node-pdf

create pdf with custom template using node

dependencies

project structure

|   .gitignore
|   index.js
|   package.json
|   README.md
|               
+---output
|       ## OUTPUT DIRECTORY ##.txt
|       
+---pdfGenerationModule
|   |   constants.js
|   |   pdfGeneratorService.js
|   |   
|   +---dataGathererModule
|   |       data.js
|   |       dataGathererService.js
|   |       
|   +---pdfGenerator
|   |       pdfGenerator.js
|   |       
|   \---pdfTemplate
|           footer.ejs
|           htmlGenerator.js
|           template.ejs
|           
\---public
    |   index.html
    |
    \---images
            china-flag.png
            china-population.PNG
            china-profile.png
            india-flag.png
            india-population.PNG
            india-profile.png
            usa-flag.png
            usa-population.PNG
            usa-profile.png

get started

  • Run "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --headless --disable-gpu --enable-logging --remote-debugging-port=9222 on Windows), keep this process running.

    • This is required by html-pdf-chrome module to convert HTML to PDF.
  • Run npm install once in project directory.

  • Start application by node index.js from project directory and visit http://localhost:3000/

  • Sample Template is in ./pdfGenerationModule/pdfTemplate/template.ejs & Generated PDF will be in ./output/ directory.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published