{"id":15285246,"url":"https://github.com/elitdevs/pdf-ghost-report","last_synced_at":"2026-03-17T18:38:47.451Z","repository":{"id":42956879,"uuid":"264645380","full_name":"ElitDevs/pdf-ghost-report","owner":"ElitDevs","description":"Open Source pdf generator for node","archived":false,"fork":false,"pushed_at":"2024-02-28T02:20:48.000Z","size":2488,"stargazers_count":21,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-17T13:45:04.820Z","etag":null,"topics":["node-module","node-pdf","nodejs","npm-package","pdf","pdf-generation","report-generator","reporting-engine","typescript","typescript-library"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ElitDevs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-17T11:09:53.000Z","updated_at":"2024-09-19T15:13:30.000Z","dependencies_parsed_at":"2024-10-03T04:00:40.720Z","dependency_job_id":"0bc2f7ff-91cd-4689-a4a8-783c7bebe3b6","html_url":"https://github.com/ElitDevs/pdf-ghost-report","commit_stats":{"total_commits":31,"total_committers":3,"mean_commits":"10.333333333333334","dds":"0.32258064516129037","last_synced_commit":"3aec10a77e7de5db62e63668575b64e0f4f87964"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ElitDevs/pdf-ghost-report","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElitDevs%2Fpdf-ghost-report","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElitDevs%2Fpdf-ghost-report/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElitDevs%2Fpdf-ghost-report/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElitDevs%2Fpdf-ghost-report/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ElitDevs","download_url":"https://codeload.github.com/ElitDevs/pdf-ghost-report/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElitDevs%2Fpdf-ghost-report/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261632033,"owners_count":23187268,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["node-module","node-pdf","nodejs","npm-package","pdf","pdf-generation","report-generator","reporting-engine","typescript","typescript-library"],"created_at":"2024-09-30T15:03:51.428Z","updated_at":"2026-03-17T18:38:47.412Z","avatar_url":"https://github.com/ElitDevs.png","language":"TypeScript","readme":"# pdf-ghost-report\n\nan open source solution for your nodejs reporting\n\n[![Version npm](https://img.shields.io/npm/v/pdf-ghost-report)](https://www.npmjs.com/package/pdf-ghost-report) ![npm Downloads](https://img.shields.io/npm/dm/pdf-ghost-report) !['License'](https://img.shields.io/github/license/ElitDevs/pdf-ghost-report)\n\n[![NPM](https://nodei.co/npm/pdf-ghost-report.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/pdf-ghost-report/)\n\n![](images/pdf-ghost-report.png)\n\n## Usage\n\n```js\n// example using express web framework\nconst express = require('express');\nconst { generatePdf } = require('pdf-ghost-report');\nrouter = express.Router();\nrouter.post('/getpdf', async (req, res, next) =\u003e {\n  // step 01 : get template name\n  const template_name = 'template_name';\n  const data = req.body;\n  // step 02 : call pdf making function by passing the template folder and name\n  const config = {\n    emulator: 'screen' || 'print',\n    printBackground: true,\n    format: 'A4',\n    margin: {\n      top: '50px',\n      bottom: '50px',\n      left: '20px',\n      right: '20px',\n    },\n    displayHeaderFooter: true,\n  };\n  /**\n   * args :\n   *  templateFolderPath: string,\n   *  templateFileName: string,\n   *  templateExtension: string,\n   *  config: object,\n   *  data: object\n   *\n   * return stream\n   * */\n  const pdf = await generatePdf('templates', 'test', 'hbs', config, data);\n  // // step 03 : return the blob pdf stream to the client\n  res.writeHead(200, {\n    'Content-Type': 'application/pdf',\n    'Content-Disposition': `attachment; filename=${template_name}.pdf`,\n    'Content-Length': pdf.length,\n  });\n  res.end(pdf);\n});\nmodule.exports = router;\n```\n\n## config\n\n[For more config Info check Puppeteer pdf section](https://pptr.dev/#?product=Puppeteer\u0026version=v3.0.4\u0026show=api-pagepdfoptions)\n\n## Installation\n\n```bash\nnpm install pdf-ghost-report\n```\n\n```bash\nyarn add pdf-ghost-report\n```\n\n## Run Tests\n\n- for now we haven't created any test\n\n```bash\nnpm test\n```\n\n## Todo\n\n    [ ] add tests\n    [ ] add docker\n    [ ] support more template engins like : `ejs, ...etc`\n\n#### Author: [BARAKA LARBI -laridev-]\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felitdevs%2Fpdf-ghost-report","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felitdevs%2Fpdf-ghost-report","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felitdevs%2Fpdf-ghost-report/lists"}