{"id":18936007,"url":"https://github.com/ivoronin/mkd2pdf","last_synced_at":"2025-04-15T18:31:20.329Z","repository":{"id":57298845,"uuid":"122612685","full_name":"ivoronin/mkd2pdf","owner":"ivoronin","description":"Markdown to pdf renderer","archived":false,"fork":false,"pushed_at":"2018-03-17T10:18:17.000Z","size":3227,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T00:41:11.939Z","etag":null,"topics":["chrome-headless","markdown","md2pdf","node","pdf","pdf-generation","phantomjs","prince","princexml","showdown","weasyprint","wkhtmltopdf"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/ivoronin.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}},"created_at":"2018-02-23T11:25:51.000Z","updated_at":"2023-10-04T00:51:12.000Z","dependencies_parsed_at":"2022-08-26T18:12:38.230Z","dependency_job_id":null,"html_url":"https://github.com/ivoronin/mkd2pdf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivoronin%2Fmkd2pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivoronin%2Fmkd2pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivoronin%2Fmkd2pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivoronin%2Fmkd2pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivoronin","download_url":"https://codeload.github.com/ivoronin/mkd2pdf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249129035,"owners_count":21217274,"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":["chrome-headless","markdown","md2pdf","node","pdf","pdf-generation","phantomjs","prince","princexml","showdown","weasyprint","wkhtmltopdf"],"created_at":"2024-11-08T12:05:21.942Z","updated_at":"2025-04-15T18:31:19.305Z","avatar_url":"https://github.com/ivoronin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mkd2pdf\nRenders markdown text in PDF using various renderers.\n\n[![hit count](http://hits.dwyl.io/ivoronin/mkd2pdf.svg)](http://hits.dwyl.io/ivoronin/mkd2pdf) [![npm version](https://badge.fury.io/js/mkd2pdf.svg)](https://badge.fury.io/js/mkd2pdf)\n\n## Prerequisites\n - Node.js \u003e= 9.0.0\n - One or more of the following software products:\n     - Google Chrome \u003e= 65.0.0\n     - [Prince](https://www.princexml.com/) \u003e= 11.0\n     - [WeasyPrint](http://weasyprint.org/) \u003e= 0.42.2\n\n## Installing\n```bash\nmkdir mkd2pdf \u0026\u0026 cd mkd2pdf\nnpm install mkd2pdf\nsudo npm link\n```\n\n## Usage\n```bash\nmkd2pdf input.md output.pdf\n```\nPlease refer to `mkd2pdf --help` for more information.\n\n## Example\n![lorem ipsum](https://raw.githubusercontent.com/ivoronin/mkd2pdf/master/example/example.png)\n\n## Supported Renderers\n| Renderer | Pros | Cons |\n|---|---|---|\n| Google Chrome | \u003cul\u003e\u003cli\u003eFree\u003c/li\u003e | \u003cul\u003e\u003cli\u003eIntermittent errors, long startup time\u003c/li\u003e\u003cli\u003ePage header and footer generation is disabled because of hardcoded contents (local file name, title and date)\u003c/li\u003e\u003cli\u003eDoes not generate bookmarks\u003c/li\u003e\u003cli\u003eDoes not support metadata\u003c/li\u003e\u003cli\u003eDoes not support auto hyphenation\u003c/li\u003e\u003c/ul\u003e |\n| [Prince](https://www.princexml.com/) | \u003cul\u003e\u003cli\u003eStable and fast\u003c/li\u003e\u003c/ul\u003e | \u003cul\u003e\u003cli\u003eAdds a small logo to the first page of generated PDF files when used with free/non-commercial license.\u003c/li\u003e\u003c/ul\u003e |\n| [WeasyPrint](http://weasyprint.org/) (Recommended) | \u003cul\u003e\u003cli\u003eOpen Source\u003c/li\u003e\u003c/ul\u003e | \u003cul\u003e\u003cli\u003eA few HTML rendering shortcomings (should be fixed in 0.42.3)\u003c/li\u003e\u003c/ul\u003e |\n\n## Metadata mapping\nYou can specify metadata in markdown document, see [example.md](https://github.com/ivoronin/mkd2pdf/raw/master/example/example.md) for an example.\n\n| PDF | Prince | WeasyPrint |\n|---|---|---|\n| Title | title | title |\n| Author | author | author |\n| Subject | subject | description |\n| Keywords | keywords | keywords |\n| Creator | generator | generator |\n\n## License\nThis project is licensed under the MIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivoronin%2Fmkd2pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivoronin%2Fmkd2pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivoronin%2Fmkd2pdf/lists"}