{"id":28203900,"url":"https://github.com/function61/html2pdf","last_synced_at":"2025-10-08T20:23:59.745Z","repository":{"id":57523122,"uuid":"77692882","full_name":"function61/html2pdf","owner":"function61","description":"Small microservice for rendering HTML input to PDF","archived":false,"fork":false,"pushed_at":"2021-08-23T07:54:20.000Z","size":3882,"stargazers_count":9,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-10T14:43:10.346Z","etag":null,"topics":["html2pdf","pdf"],"latest_commit_sha":null,"homepage":"https://function61.com/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/function61.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}},"created_at":"2016-12-30T15:04:14.000Z","updated_at":"2023-04-27T12:34:44.000Z","dependencies_parsed_at":"2022-08-28T11:20:50.020Z","dependency_job_id":null,"html_url":"https://github.com/function61/html2pdf","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/function61/html2pdf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/function61%2Fhtml2pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/function61%2Fhtml2pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/function61%2Fhtml2pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/function61%2Fhtml2pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/function61","download_url":"https://codeload.github.com/function61/html2pdf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/function61%2Fhtml2pdf/sbom","scorecard":{"id":413795,"data":{"date":"2025-08-11","repo":{"name":"github.com/function61/html2pdf","commit":"9bb3a8a5279fea172a13dff67ff82f445544dd51"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.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":"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":"Code-Review","score":0,"reason":"Found 0/21 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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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":"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":"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/build.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/function61/html2pdf/build.yml/master?enable=pin","Info:   0 out of   1 GitHub-owned GitHubAction 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":"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: Apache License 2.0: 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":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.4.0 not signed: https://api.github.com/repos/function61/html2pdf/releases/24163042","Warn: release artifact v0.4.0 does not have provenance: https://api.github.com/repos/function61/html2pdf/releases/24163042"],"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":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/function61/.github/SECURITY.md:1","Info: Found linked content: github.com/function61/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/function61/.github/SECURITY.md:1","Info: Found text in security policy: github.com/function61/.github/SECURITY.md:1"],"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"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-18T23:19:08.831Z","repository_id":57523122,"created_at":"2025-08-18T23:19:08.831Z","updated_at":"2025-08-18T23:19:08.831Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000659,"owners_count":26082817,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["html2pdf","pdf"],"created_at":"2025-05-17T03:15:56.626Z","updated_at":"2025-10-08T20:23:59.729Z","avatar_url":"https://github.com/function61.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Build status](https://github.com/function61/html2pdf/workflows/Build/badge.svg)\n\nWhat?\n-----\n\nA small microservice that turns HTML into a PDF file. You can run this:\n\n- on AWS Lambda\n- with Docker\n  * I didn't bother making a `Dockerfile` though, since I didn't need it. PR welcome!\n- as a standalone binary\n\nThere also exists [a small client library for Go](pkg/html2pdfclient/)\n\n\nSecurity\n--------\n\nWhile we're confident in this project's code, ultimately this is a wrapper to wkhtmltopdf, and thus\nyou should be aware of its [status](https://wkhtmltopdf.org/status.html#recommendations) and its\nsecurity considerations:\n\n- Do not use with untrusted HTML. Only render HTML that you control.\n- whtmltopdf uses QtWebKit that hasn’t been updated since 2012\n\t* Qt abandoned QtWebkit in favor or QtWebEngine which uses Chromium internally\n\n\nTesting\n-------\n\nYou can start a local server process with:\n\n```console\n$ html2pdf server\n```\n\nThen call it from the client:\n\n```console\n$ export HTML2PDF_TOKEN=\"doesntMatter\" # optionally you can put the service behind authentication\n$ html2pdf client-localhost '\u003ch1\u003ehello world\u003c/h1\u003e' \u003e out.pdf\n```\n\nUsage from curl is also simple:\n\n```console\n$ curl -d '{\"html_base64\": \"PGgxPmhlbGxvIHdvcmxkPC9oMT4=\"}' http://localhost/render \u003e out.pdf\n```\n\n\nPrerequisites for dev/testing\n-----------------------------\n\n```console\n$ apt install -y libxrender1 libxext6 libfontconfig1\n```\n\n(Fortunately, these exist in Lambda's AMI)\n\n\nAlternatives\n------------\n\n- https://weasyprint.org/ (Python, self-implemented rendering)\n- https://github.com/shouldbee/docker-html2pdf (go, wkhtmltox)\n- https://github.com/carlescliment/html2pdf-service (PHP, wkhtmltopdf)\n- https://github.com/spipu/html2pdf (PHP, self-implemented HTML rendering)\n\n\nSupport / contact\n-----------------\n\nBasic support (no guarantees) for issues / feature requests via GitHub issues.\n\nPaid support is available via [function61.com/consulting](https://function61.com/consulting/)\n\nContact options (email, Twitter etc.) at [function61.com](https://function61.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunction61%2Fhtml2pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffunction61%2Fhtml2pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunction61%2Fhtml2pdf/lists"}