{"id":40225504,"url":"https://github.com/isneezy/pdf-generator-service","last_synced_at":"2026-01-19T22:32:55.880Z","repository":{"id":37078567,"uuid":"294224339","full_name":"isneezy/pdf-generator-service","owner":"isneezy","description":"A simple express service that generates a pdf based on the submitted HTML","archived":false,"fork":false,"pushed_at":"2023-04-14T18:59:00.000Z","size":1207,"stargazers_count":43,"open_issues_count":13,"forks_count":10,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-11-23T08:04:21.550Z","etag":null,"topics":["docker","html-to-pdf","pdf","rest-api","toc-generator"],"latest_commit_sha":null,"homepage":"","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/isneezy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://paypal.me/isneezy"]}},"created_at":"2020-09-09T20:38:27.000Z","updated_at":"2024-11-22T15:29:31.000Z","dependencies_parsed_at":"2023-02-13T23:31:15.948Z","dependency_job_id":null,"html_url":"https://github.com/isneezy/pdf-generator-service","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/isneezy/pdf-generator-service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isneezy%2Fpdf-generator-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isneezy%2Fpdf-generator-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isneezy%2Fpdf-generator-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isneezy%2Fpdf-generator-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/isneezy","download_url":"https://codeload.github.com/isneezy/pdf-generator-service/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isneezy%2Fpdf-generator-service/sbom","scorecard":{"id":495887,"data":{"date":"2025-08-11","repo":{"name":"github.com/isneezy/pdf-generator-service","commit":"04966600d4ba38cbec89ea32d52c7bf0ddbe79c8"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":1,"reason":"Found 1/6 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/docker.yml:1","Warn: no topLevel permission defined: .github/workflows/node.js.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact @isneezy/pdf-generator-service@1.1.3 not signed: https://api.github.com/repos/isneezy/pdf-generator-service/releases/90067567","Warn: release artifact @isneezy/pdf-generator-service@1.1.2 not signed: https://api.github.com/repos/isneezy/pdf-generator-service/releases/90066792","Warn: release artifact @isneezy/pdf-generator-service@1.1.1 not signed: https://api.github.com/repos/isneezy/pdf-generator-service/releases/90059141","Warn: release artifact @isneezy/pdf-generator-cli@1.1.3 not signed: https://api.github.com/repos/isneezy/pdf-generator-service/releases/90067530","Warn: release artifact @isneezy/pdf-generator-service@1.1.3 does not have provenance: https://api.github.com/repos/isneezy/pdf-generator-service/releases/90067567","Warn: release artifact @isneezy/pdf-generator-service@1.1.2 does not have provenance: https://api.github.com/repos/isneezy/pdf-generator-service/releases/90066792","Warn: release artifact @isneezy/pdf-generator-service@1.1.1 does not have provenance: https://api.github.com/repos/isneezy/pdf-generator-service/releases/90059141","Warn: release artifact @isneezy/pdf-generator-cli@1.1.3 does not have provenance: https://api.github.com/repos/isneezy/pdf-generator-service/releases/90067530"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docker.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/isneezy/pdf-generator-service/docker.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/isneezy/pdf-generator-service/node.js.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/isneezy/pdf-generator-service/node.js.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/isneezy/pdf-generator-service/node.js.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/node.js.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/isneezy/pdf-generator-service/node.js.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/isneezy/pdf-generator-service/node.js.yml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1","Warn: containerImage not pinned by hash: Dockerfile:35","Warn: containerImage not pinned by hash: Dockerfile:46","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   3 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 26 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"37 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-h452-7996-h45h","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-9j49-mfvp-vmhm","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-75v8-2h7p-7m2m","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-pq67-2wwv-3xjx","Warn: Project is vulnerable to: GHSA-8cj5-5rvv-wf4v","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T20:24:52.360Z","repository_id":37078567,"created_at":"2025-08-19T20:24:52.360Z","updated_at":"2025-08-19T20:24:52.360Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28587241,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T20:45:59.482Z","status":"ssl_error","status_checked_at":"2026-01-19T20:45:41.500Z","response_time":67,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["docker","html-to-pdf","pdf","rest-api","toc-generator"],"created_at":"2026-01-19T22:32:55.807Z","updated_at":"2026-01-19T22:32:55.874Z","avatar_url":"https://github.com/isneezy.png","language":"TypeScript","funding_links":["https://paypal.me/isneezy"],"categories":[],"sub_categories":[],"readme":"# Express PDF Generator Service\n\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/isneezy/pdf-generator-service/node.js.yml?branch=master\u0026logo=github)](https://github.com/isneezy/pdf-generator-service/tree/next)\n[![Docker Repository on Quay](https://quay.io/repository/isneezy/pdf-generator-service/status \"Docker Repository on Quay\")](https://quay.io/repository/isneezy/pdf-generator-service)\n[![Coverage Status](https://coveralls.io/repos/github/isneezy/pdf-generator-service/badge.svg?branch=master)](https://coveralls.io/github/isneezy/pdf-generator-service?branch=master)\n\n\u003e ☝️ A next version with better performance and features is coming soon.  \n\u003e To try it out, check its documentation in the\n\u003e [next branch](https://github.com/isneezy/pdf-generator-service/tree/next).\n\nA simple express service that generates a pdf based on the submitted HTML using Chromium and Puppeteer.\n\n## Getting started\n#### Running locally\n```bash\n## build\nyarn install\nyarn build\n## Running the server\nnode ./dist/src/index.js\n## Or simply\nyarn start\n```\n#### Running with docker\n```\ndocker run --rm -p 3000:3000 --name=pdf-generator quay.io/isneezy/pdf-generator-service\n```\nCheck our [docker repository](https://quay.io/repository/isneezy/pdf-generator-service?tab=tags) for available tags\n\n## API\nThe webserver started by express.js has one JSON endpoint to generate PDFs.\n\n#### POST `/generate`\nWill generate a PDF based on the given `payload` data and returns the pdf file as a stream\n```json5\n{\n  \"goto\": \"\", // optional - URL to the HTML content/handlebars template to be converted to PDF. This option overrides the content when present.\n  \"content\": \"\", // required when goto is not present - HTML string/handlebars template to be converted to PDF,\n  \"context\": {}, // object with the data to be passed to handlebars template engine\n \"orientation\": \"portrait\", // optional - possible values [\"portrait\", \"landscape\"]\n \"format\": \"A4\", // optional - possible values  [\"Letter\", \"Legal\", \"Tabloid\", \"Ledger\", \"A0\", \"A1\", \"A2\", \"A3\", \"A4\", \"A5\", \"A6\"]\n \"header\": \"\", // optional - HTML template for the print header. See https://github.com/puppeteer/puppeteer/blob/main/docs/api.md#pagepdfoptions\n \"footer\": \"\" // optional - HTML template for the print footer. available context variables date: title, url, pageNumber, totalPages and pageNumber. Note these variables should be used with 3 mustaches ex: {{{ pageNumber }}}\n}\n```\n\n##### Example\n```json5\n{\n \"content\": \"\u003ch2\u003eHello from Express PDF Generator Service\u003c/h2\u003e\u003cp\u003eWriten by {{ author }}\u003c/p\u003e\",\n \"context\": { \"author\": \"Ivan Vilanculo \u003cmail@example.com\u003e\" },\n \"orientation\": \"portrait\",\n \"format\": \"A5\",\n \"footer\": \"\u003cp\u003e{{ name }} \u0026copy; {{{ date }}}, page {{{ pageNumber }}} of {{{ totalPages }}}\u003c/p\u003e\"\n}\n```\n\n### Generating table of contents (TOCs)\nPDF Generator Service can generate TOCs for your document. All you have to do is simply add the template for your TOCs inside an element with `.print-toc` class.\n  \n**Note**:\n1. This feature highly relies on semantic HTML, which means that all heading tags (h1, h2, h3, h4, h5, and h6) will be used to create your TOCs.\nAdd `toc-ignore` class to a heading tag if you want to ignore. \n2. TOCs will always appear or be rendered on the first pages of your document.\n```handlebars\n\u003chtml\u003e\n\u003cbody\u003e\n\u003cdiv class=\"print-toc\"\u003e\n\u003ch1\u003eTable of contents\u003c/h1\u003e\n{{#each _toc}}\n\u003ca style=\"display: flex; margin-bottom: 6px; text-decoration: none; color: inherit\" href=\"{{ this.href }}\"\u003e\n    \u003cdiv\u003e{{ this.title }}\u003c/div\u003e\n    \u003cdiv style=\"margin: 0 4px; flex: 1; border-bottom: 2px dotted black\"\u003e\u003c/div\u003e\n    \u003cdiv\u003e{{ this.page }}\u003c/div\u003e\n\u003c/a\u003e\n{{/each}}\n\u003c/div\u003e\n\u003c!-- place your document markup content here and all heading tags will be used to create TOCs --\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisneezy%2Fpdf-generator-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisneezy%2Fpdf-generator-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisneezy%2Fpdf-generator-service/lists"}