{"id":16119426,"url":"https://github.com/codingchili/github-markdown-pdf","last_synced_at":"2026-04-28T08:02:50.383Z","repository":{"id":87434321,"uuid":"255069156","full_name":"codingchili/github-markdown-pdf","owner":"codingchili","description":"Sometimes you're too lazy to get it right with pandoc.","archived":false,"fork":false,"pushed_at":"2020-04-12T12:00:48.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T10:19:36.059Z","etag":null,"topics":["github","markdown","pdf","pdf-generation"],"latest_commit_sha":null,"homepage":null,"language":null,"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/codingchili.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":"2020-04-12T11:37:10.000Z","updated_at":"2020-04-18T22:45:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"37e78f9b-4339-4426-b6bf-9b765ca555b9","html_url":"https://github.com/codingchili/github-markdown-pdf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codingchili/github-markdown-pdf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingchili%2Fgithub-markdown-pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingchili%2Fgithub-markdown-pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingchili%2Fgithub-markdown-pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingchili%2Fgithub-markdown-pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codingchili","download_url":"https://codeload.github.com/codingchili/github-markdown-pdf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codingchili%2Fgithub-markdown-pdf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32371673,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"online","status_checked_at":"2026-04-28T02:00:07.250Z","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":["github","markdown","pdf","pdf-generation"],"created_at":"2024-10-09T20:54:07.754Z","updated_at":"2026-04-28T08:02:50.305Z","avatar_url":"https://github.com/codingchili.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# github-markdown-pdf\nSometimes you're too lazy to get it right with pandoc.\n\nThis tiny script makes it possible to render markdown hosted on GitHub to pdf using the browser.\n\n1) view a **markdown** file on github.\n2) press alt+shift+I and open the chrome console.\n3) paste the following snippet and print (save) to pdf.\n\n```javascript\nlet markdown = document.getElementById('readme');\n\n// remove the box-header if in file reader\nif (markdown.firstElementChild.tagName === 'DIV') {\n    markdown.removeChild(markdown.firstElementChild)\n}\ndocument.body.innerHTML = markdown.innerHTML;\n\nlet style = document.createElement('style');\nstyle.type = 'text/css';\nstyle.innerHTML = `\n@page {\n  margin: 0;\n}\n\nimg {\n   /* custom style for your images. */\n}\n\nbody {\n    padding: 24px;\n}\n\n`;\ndocument.getElementsByTagName('head')[0].appendChild(style);\nprint();\nlocation.reload();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodingchili%2Fgithub-markdown-pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodingchili%2Fgithub-markdown-pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodingchili%2Fgithub-markdown-pdf/lists"}