{"id":15083865,"url":"https://github.com/ryuapp/md2pdf","last_synced_at":"2025-10-13T02:22:10.631Z","repository":{"id":253053823,"uuid":"842314277","full_name":"ryuapp/md2pdf","owner":"ryuapp","description":"A simple CLI tool for converting markdown to PDF.","archived":false,"fork":false,"pushed_at":"2025-01-20T17:43:03.000Z","size":46,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T08:33:44.427Z","etag":null,"topics":["cli","deno","markdown","markdown-to-pdf"],"latest_commit_sha":null,"homepage":"https://jsr.io/@ryu/md2pdf","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/ryuapp.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-14T05:18:47.000Z","updated_at":"2025-01-20T17:41:36.000Z","dependencies_parsed_at":"2025-01-12T03:25:22.560Z","dependency_job_id":"27fb654f-a8fd-4f61-9ef7-1b9ed9398f0f","html_url":"https://github.com/ryuapp/md2pdf","commit_stats":{"total_commits":23,"total_committers":1,"mean_commits":23.0,"dds":0.0,"last_synced_commit":"d45a7f4f9c5586ed7cd9f6f5c33fb2158b630b0e"},"previous_names":["ryuapp/md2pdf"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryuapp%2Fmd2pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryuapp%2Fmd2pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryuapp%2Fmd2pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryuapp%2Fmd2pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryuapp","download_url":"https://codeload.github.com/ryuapp/md2pdf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243955715,"owners_count":20374372,"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":["cli","deno","markdown","markdown-to-pdf"],"created_at":"2024-09-25T07:00:21.035Z","updated_at":"2025-10-13T02:22:10.626Z","avatar_url":"https://github.com/ryuapp.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# md2pdf\n\n[![JSR](https://jsr.io/badges/@ryu/md2pdf)](https://jsr.io/@ryu/md2pdf)\n\nA simple CLI tool for converting markdown to PDF.\\\nIt uses `md4w` to convert markdown to HTML and `playwright-core` (headless Chrome) to further convert the HTML to PDF. It also uses `shiki` for code highlighting.\n\n## Installation\n\nTo run it, you need to have [Google Chrome](https://www.google.com/chrome/) installed separately from the CLI.\n\n```sh\ndeno install -grA jsr:@ryu/md2pdf/cli\n```\n\nNote: If you want to update the CLI, please reinstall with `-f` flag.\n\n## Usage\n\n```sh\nmd2pdf: A simple CLI tool for converting markdown to PDF.\n\nUsage: md2pdf [OPTION]... [FILE]...\n\nOptions:\n  -w, --watch    Watch for file changes.\n  -h, --help     Print help.\n  -v, --version  Print version.\n  --stylesheet   Set CSS file path used for rendering.\n```\n\nThe pdf is generated into the same directory as the markdown file and uses the same filename (with `.pdf` extension):\n\n```sh\nmd2pdf file.md\n```\n\nConvert multiple markdown files:\n\n```sh\nmd2pdf file1.md file2.md file3.md\n```\n\n### Watch mode\n\nWatch for file changes and automatically regenerate PDF when the markdown file is modified:\n\n```sh\nmd2pdf --watch file.md\n```\n\nThis is useful for continuous development where you want to see PDF updates in real-time as you edit your markdown.\n\n### `stdin` / `stdout` Support\n\nmd2pdf supports reading from `stdin` and writing to `stdout`.\\\nYou can pipe markdown content directly to md2pdf, making it easy to integrate with other CLI tools:\n\n```sh\n# Convert piped input to PDF\ncat file.md | md2pdf \u003e path/to/output.pdf\n\n# Use with curl to convert remote markdown\ncurl -s https://raw.githubusercontent.com/ryuapp/md2pdf/main/README.md | md2pdf \u003e README.pdf\n```\n\n## Front matter (Experimental)\n\nWe can specify CSS file used in the front matter of markdown.\n\n```md\n---\nstylesheet: ./github.css\n---\n\n# Hello World\n```\n\n## Related\n\n- [md-to-pdf](https://github.com/simonhaenisch/md-to-pdf) - Markdown to PDF CLI\n  for Node.js.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryuapp%2Fmd2pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryuapp%2Fmd2pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryuapp%2Fmd2pdf/lists"}