{"id":22862369,"url":"https://github.com/hq20/pdf-from-html","last_synced_at":"2026-01-07T23:46:28.300Z","repository":{"id":57321406,"uuid":"181214179","full_name":"HQ20/pdf-from-html","owner":"HQ20","description":"Transform an HTML file in a PDF file","archived":false,"fork":false,"pushed_at":"2020-06-17T09:15:42.000Z","size":201,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T11:15:20.480Z","etag":null,"topics":["html","pdf","pdf-generation","render","transform"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HQ20.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":"2019-04-13T18:40:54.000Z","updated_at":"2020-06-17T09:15:45.000Z","dependencies_parsed_at":"2022-08-25T21:00:55.986Z","dependency_job_id":null,"html_url":"https://github.com/HQ20/pdf-from-html","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HQ20%2Fpdf-from-html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HQ20%2Fpdf-from-html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HQ20%2Fpdf-from-html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HQ20%2Fpdf-from-html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HQ20","download_url":"https://codeload.github.com/HQ20/pdf-from-html/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246443525,"owners_count":20778247,"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":["html","pdf","pdf-generation","render","transform"],"created_at":"2024-12-13T10:13:09.986Z","updated_at":"2026-01-07T23:46:28.266Z","avatar_url":"https://github.com/HQ20.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cdiv style=\"width:870px;height:300px;display:flex;margin:auto\"\u003e\n        \u003cimg style=\"\" width=\"300\" src=\"pdf.svg\"\u003e\u0026emsp;\u0026emsp;\u0026emsp;\n        \u003cspan style=\"line-height:300px;font-size:80px\"\u003epdf-from-html\u003c/span\u003e\n    \u003c/div\u003e\n\u003c/div\u003e\n\n\u003e pdf-from-html is a nodejs library to transform an html (possibly from [markdown-it](https://markdown-it.github.io/)) in a PDF.\n\n\u003cdiv align=\"center\"\u003e\n    \u003cdiv\u003e\n        \u003ca\n            href=\"https://travis-ci.org/HQ20/pdf-from-html\"\u003e\u003cimg\n                src=\"https://travis-ci.org/HQ20/pdf-from-html.svg?branch=master\" /\u003e\u003c/a\u003e\u0026emsp;\n        \u003ca\n            href=\"https://dependabot.com\"\u003e\u003cimg\n                src=\"https://api.dependabot.com/badges/status?host=github\u0026repo=HQ20/pdf-from-html\" /\u003e\u003c/a\u003e\u0026emsp;\n    \u003c/div\u003e\n\u003c/div\u003e\n\n\n## Installation\n\nInstall it with npm or yarn.\n\n```bash\n$ npm install --dev pdf-from-html\n# or\n$ yarn add --dev pdf-from-html\n```\n\n## Usage\n\nIt's possible to use it from command line\n\n```bash\n$ pdf-from-html docs/ somefile.html\n```\nas npm script\n```bash\n\"scripts\": {\n    \"pdf\": \"pdf-from-html docs/ somefile.html\"\n},\n```\nor as part of your nodejs app\n```typescript\nimport { generatePDF } from 'pdf-from-html';\n// or\n// const generatePDF = require('pdf-from-html').generatePDF;\n// and then just call the method\ngeneratePDF(outputDir: string, outputFileName: string, inputContent: string);\n```\n\n## Contributing\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## License\n[Apache-2.0](LICENSE.md)\n\n## Credits\n* Icons made by \u003ca href=\"https://www.flaticon.com/authors/freepik\" title=\"Freepik\"\u003eFreepik\u003c/a\u003e from \u003ca href=\"https://www.flaticon.com/\" title=\"Flaticon\"\u003e www.flaticon.com\u003c/a\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhq20%2Fpdf-from-html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhq20%2Fpdf-from-html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhq20%2Fpdf-from-html/lists"}