{"id":15021536,"url":"https://github.com/krakenui/octopus-pdf","last_synced_at":"2026-01-30T04:11:03.169Z","repository":{"id":42722576,"uuid":"282188389","full_name":"krakenui/octopus-pdf","owner":"krakenui","description":"Nodejs export pdf report from base html templates by KrakenTeam!","archived":false,"fork":false,"pushed_at":"2023-10-03T07:42:00.000Z","size":839,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-02T23:35:22.492Z","etag":null,"topics":["chartjs2pdf","html","html2pdf","htmlpdf","htmlreport","kraken","node","octopus","pdf","report"],"latest_commit_sha":null,"homepage":"https://docs.krakenui.com/octopus-pdf","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krakenui.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-07-24T10:17:44.000Z","updated_at":"2023-05-14T11:44:07.000Z","dependencies_parsed_at":"2024-10-08T10:42:03.772Z","dependency_job_id":"dcd41fe8-715e-48ab-88c2-eb8d2285edd7","html_url":"https://github.com/krakenui/octopus-pdf","commit_stats":{"total_commits":14,"total_committers":2,"mean_commits":7.0,"dds":0.0714285714285714,"last_synced_commit":"aa68ee5e7cf0b207a86c578e33700c305276c604"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/krakenui/octopus-pdf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krakenui%2Foctopus-pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krakenui%2Foctopus-pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krakenui%2Foctopus-pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krakenui%2Foctopus-pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krakenui","download_url":"https://codeload.github.com/krakenui/octopus-pdf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krakenui%2Foctopus-pdf/sbom","scorecard":{"id":569379,"data":{"date":"2025-08-11","repo":{"name":"github.com/krakenui/octopus-pdf","commit":"aa68ee5e7cf0b207a86c578e33700c305276c604"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.3,"checks":[{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/publish-npm.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":"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":"Code-Review","score":0,"reason":"Found 0/13 approved changesets -- score normalized to 0","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":"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":"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":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-npm.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/krakenui/octopus-pdf/publish-npm.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-npm.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/krakenui/octopus-pdf/publish-npm.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/publish-npm.yml:24","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   2 npmCommand 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":"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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":-1,"reason":"no releases found","details":null,"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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 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":"22 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-897m-rjf5-jp39","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-phwq-j96m-2c2q","Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6","Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","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-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"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-20T15:53:16.687Z","repository_id":42722576,"created_at":"2025-08-20T15:53:16.687Z","updated_at":"2025-08-20T15:53:16.687Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28900978,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T04:02:34.702Z","status":"ssl_error","status_checked_at":"2026-01-30T04:02:33.562Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["chartjs2pdf","html","html2pdf","htmlpdf","htmlreport","kraken","node","octopus","pdf","report"],"created_at":"2024-09-24T19:56:41.951Z","updated_at":"2026-01-30T04:11:03.155Z","avatar_url":"https://github.com/krakenui.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# octopus-pdf\n\nNodejs export pdf report from base html templates!\n\n[![NPM version][npm-image]][npm-url] [![npm download][download-image]][download-url]\n\n[npm-image]: http://img.shields.io/npm/v/octopus-pdf.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/octopus-pdf\n[download-image]: https://img.shields.io/npm/dm/octopus-pdf.svg?style=flat-square\n[download-url]: https://npmjs.org/package/octopus-pdf\n\n## Install\n\n[![octopus-pdf](https://nodei.co/npm/octopus-pdf.png)](https://npmjs.org/package/octopus-pdf)\n\n```\nnpm install --save octopus-pdf\n```\n\n## Supports\n\n- Base html template with [EJS](https://github.com/mde/ejs) engine.\n- Embeded [Chart.js v2.9.3](https://www.chartjs.org).\n- Server side without browser.\n\n## Examples\n\n- Import from package\n\n```\n   import { HtmlReport, ReportOptions } from \"octopus-pdf\";\n```\n\n- Define configures\n\n```\nconst reportOptions: ReportOptions = {\n  title: \"Test report with chartjs\",\n  useChartJs: true,\n  pdfOptions: {\n    margin: {\n      top: \"100px\",\n      bottom: \"200px\",\n      right: \"30px\",\n      left: \"30px\",\n    },\n  },\n  template: \"template.ejs\",\n  headerTemplate: \"header-template.ejs\",\n  footerTemplate: \"footer-template.ejs\",\n  styles: [\n      \"styles.css\"\n  ],\n  scripts: [\n    \"utils.js\",\n    \"index.js\",\n  ],\n  data: {\n    users: [\n        {\n            name: \"Luong Phung\",\n        },\n        {\n            name: \"Jasmine\",\n        },\n    ],\n    title: \"Test report with chartjs\",\n    author: \"Luong Phung\",\n    time: \"2020\",\n  },\n};\n```\n\n- Create pdf file as buffer\n\n```\n  const htmlReport = new HtmlReport();\n  const reportPdf = await htmlReport.createPdf(reportOptions);\n  const savePath = path.resolve(\"./chartjs_report.pdf\");\n  fs.writeFileSync(savePath, reportPdf, \"binary\");\n```\n\n- Check you report file _\"chartjs_report.pdf\"_\n\n## Screen shots\n\n![screen shot](./screen-shots/output1.png)\n\n## API references\n\n### PdfOptions\n\n| Name            | type                       | default      | Description                                 |\n| --------------- | -------------------------- | ------------ | ------------------------------------------- |\n| scale           | number                     | 1            | Scale of the webpage rendering              |\n| printBackground | boolean                    | false        | Print background graphics.                  |\n| landscape       | boolean                    | false        | Paper orientation                           |\n| format          | string                     | \"A4\"         | Page format as : \"Letter\" \"A0\" ... \"A4\" ... |\n| margin          | {top, bottom, left, right} | {0, 0, 0, 0} | Page margin as number of pixels             |\n\n### ReportOptions\n\n| Name           | type                       | default | Description            |\n| -------------- | -------------------------- | ------- | ---------------------- |\n| title          | string                     | null    | Pdf report title       |\n| useChartJs     | boolean                    | false   | Use chartjs as default |\n| pdfOptions     | [PdfOptions](#PdfOptions) | null    | any                    |\n| template       | string                     | null    | Template path          |\n| footerTemplate | string                     | null    | Footer template path   |\n| headerTemplate | string                     | null    | Header template path   |\n| styles         | string[]                   | []      | Style paths            |\n| scripts        | string[]                   | []      | Scripts paths          |\n| data           | object                     | {}      | Report data            |\n\n## License\n\noctopus-pdf is released under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrakenui%2Foctopus-pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrakenui%2Foctopus-pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrakenui%2Foctopus-pdf/lists"}