{"id":22792614,"url":"https://github.com/johnantoni/wkhtmltopdf-how-to","last_synced_at":"2026-02-17T02:33:36.557Z","repository":{"id":14071359,"uuid":"16774825","full_name":"johnantoni/wkhtmltopdf-how-to","owner":"johnantoni","description":"wkhtmltopdf for osx","archived":false,"fork":false,"pushed_at":"2014-02-18T18:23:58.000Z","size":15124,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-21T22:39:11.241Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"weui/react-weui","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnantoni.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":"2014-02-12T17:07:29.000Z","updated_at":"2019-08-13T15:35:25.000Z","dependencies_parsed_at":"2022-09-23T18:50:34.782Z","dependency_job_id":null,"html_url":"https://github.com/johnantoni/wkhtmltopdf-how-to","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/johnantoni/wkhtmltopdf-how-to","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnantoni%2Fwkhtmltopdf-how-to","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnantoni%2Fwkhtmltopdf-how-to/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnantoni%2Fwkhtmltopdf-how-to/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnantoni%2Fwkhtmltopdf-how-to/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnantoni","download_url":"https://codeload.github.com/johnantoni/wkhtmltopdf-how-to/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnantoni%2Fwkhtmltopdf-how-to/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29531021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T00:57:22.232Z","status":"online","status_checked_at":"2026-02-17T02:00:08.105Z","response_time":100,"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":[],"created_at":"2024-12-12T03:15:35.637Z","updated_at":"2026-02-17T02:33:36.540Z","avatar_url":"https://github.com/johnantoni.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"### wkhtmltopdf binary for osx\n\nCurrently works on OSX 10.9.1 Mavericks\n\noriginal article [http://stackoverflow.com/a/10931279](http://stackoverflow.com/a/10931279)\n\n#### install\n\nFirst download, open and drag to Applications\n\nThen:\n\n    cd /usr/local/bin \u0026\u0026 sudo ln -s /Applications/wkhtmltopdf.app/Contents/MacOS/wkhtmltopdf wkhtmltopdf\n\n#### issues\n\n* will not support images from https locations\n* does support background-image replacement\n* margin attribute issues\n* position: absolute issues\n\nFor complex layouts suggest using inline styling or less complex styles, for table data use tables rather than inline lists.\n\n#### headers and footers\n\nheader and footer html can be added to the pdf via a meta tag\n\n    meta[content=\"header.html\" name=\"pdfkit-header-html\"]\n    meta[content=\"footer.html\" name=\"pdfkit-footer-html\"]\n\nthis won't work straight off with rails as they will be wrapped with **basic auth**, so the easiest way to do this is to host those files on s3 outside the system.\n\n    meta[content=\"http://s3.bucket.com/footer.html\" name=\"pdfkit-footer-html\"]\n\nor create the file and run a local webserver to host it\n\n    mkdir pdf\n    cd pdf\n    vim footer.html\n    ...then\n    python -m SimpleHTTPServer\n    ...\n    meta[content=\"http://localhost:8000/footer.html\" name=\"pdfkit-footer-html\"]\n\nnote, no css from the parent file will be dragged in to the header/footer, for this you'll have to use inline styling.\n\n#### running\n\nRather than downloading each file again and again and getting ...(1).pdf, ...(2).pdf you can use wget to download the pdf and overwrite the original\n\n    wget -N http://localhost:3000/report/pdf.pdf\n    =\u003e outputs to pdf.pdf\n    \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnantoni%2Fwkhtmltopdf-how-to","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnantoni%2Fwkhtmltopdf-how-to","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnantoni%2Fwkhtmltopdf-how-to/lists"}