{"id":15293337,"url":"https://github.com/mvz/ghtml2pdf","last_synced_at":"2025-08-20T06:08:18.058Z","repository":{"id":2593332,"uuid":"43008318","full_name":"mvz/ghtml2pdf","owner":"mvz","description":"HTML to PDF converter based on WebKit2GTK+ and GirFFI","archived":false,"fork":false,"pushed_at":"2025-06-14T12:38:02.000Z","size":204,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-15T19:17:17.761Z","etag":null,"topics":["gir-ffi","hacktoberfest","pdf-converter","ruby","webkit2gtk"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/mvz.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null}},"created_at":"2015-09-23T15:05:35.000Z","updated_at":"2025-06-14T12:38:05.000Z","dependencies_parsed_at":"2025-01-18T01:21:28.050Z","dependency_job_id":"59f84b6c-912b-4c51-8d7c-965a8cce9f6c","html_url":"https://github.com/mvz/ghtml2pdf","commit_stats":{"total_commits":227,"total_committers":3,"mean_commits":75.66666666666667,"dds":0.2555066079295154,"last_synced_commit":"bf12fe2136767435c99731b4bbd74ae2154d9532"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/mvz/ghtml2pdf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvz%2Fghtml2pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvz%2Fghtml2pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvz%2Fghtml2pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvz%2Fghtml2pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mvz","download_url":"https://codeload.github.com/mvz/ghtml2pdf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mvz%2Fghtml2pdf/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265121386,"owners_count":23714501,"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":["gir-ffi","hacktoberfest","pdf-converter","ruby","webkit2gtk"],"created_at":"2024-09-30T16:46:21.935Z","updated_at":"2025-07-13T09:36:52.077Z","avatar_url":"https://github.com/mvz.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GHtml2Pdf\n\nby Matijs van Zuijlen\n\n## Description\n\nThis will (perhaps) be a HTML to PDF converter based on WebKit2GTK+, using\n[GirFFI](https://github.com/mvz/gir_ffi) to drive it from Ruby.\n\n## Why I'm making this\n\nWkhtmltopdf annoys me, because:\n\n* It patches Qt, causing enourmous bloat in the binary\n* It uses QtWebkit, which is a browser kit not used by any popular browser (not\n  even Konquerer), so no-one really notices if its rendering breaks (and it\n  does)\n* Building it yourself from source requires several GB of disk space\n\n## The plan\n\nCreate a clean Ruby implementation of a converter using WebKit to render the\nHTML and Gtk+'s print functionality to render the PDF. A web view can be\nrendered offline so no windows should appear. Ideally, we would not want to\nneed X11, but as a workaround I'll use xvfb-run as a wrapper.\n\n## Status\n\nThis is by no means done yet. If you need something production-ready now, use\nWkhtmltopdf or something else! That said, I'd love for people to try this out\nand provide feedback. Also see Contributing below.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'ghtml2pdf'\n```\n\nAnd then execute:\n\n```bash\nbundle\n```\n\nOr install it yourself as:\n\n```bash\ngem install ghtml2pdf\n```\n\nYou will also need to install WebKit2GTK+, the Gtk+ bindings for WebKit2,\nand GObject Introspection. You should probably also install AT-Spi 2 to\navoid some annoying warning messages.\n\nOn Debian and Ubuntu, this can be accomplished by installing the packages\n`libgirepository-1.0-1`, `gir1.2-gtk-3.0`, `gir1.2-webkit2-3.0` or\n`gir1.2-webkit2-4.0`, and `at-spi2-core`. You may also need to install ...\n\n## Usage\n\nThe intended usage will be something like:\n\n```bash\nghtml2pdf input.html output.pdf\n```\n\n## Development\n\nAfter checking out the repo, install dependencies as described under\n'Installation', and run `bundle install`. Then, run `bundle exec rake spec` to\nrun the tests.\n\nTo install this gem onto your local machine, run `bundle exec rake install`.\n\n## Contributing\n\nAll contributions are welcome, so please feel free to file tickets or send pull\nrequests!\n\nIf you want to send pull requests or patches, please try to follow these\ninstructions. If you get stuck, make a pull request anyway and I'll try to help\nout.\n\n* Make sure `rake spec` runs without reporting any failures.\n* Add tests for your feature. Otherwise, I can't see if it works or if I\n  break it later.\n* Make sure latest master merges cleanly with your branch. Things might\n  have moved around since you forked.\n* Try not to include changes that are irrelevant to your feature in the\n  same commit.\n\nYou can submit your tickets and pull requests at\n[GHtml2Pdf's GitHub repository](https://github.com/mvz/ghtml2pdf).\n\n## License\n\nCopyright \u0026copy; 2015\u0026ndash;2024 [Matijs van Zuijlen](http://www.matijs.net)\n\nThe gem is available as open source under the terms of the\n[MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvz%2Fghtml2pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmvz%2Fghtml2pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmvz%2Fghtml2pdf/lists"}