{"id":24108693,"url":"https://github.com/ksylvest/mupdf","last_synced_at":"2025-06-20T20:33:48.197Z","repository":{"id":270760185,"uuid":"911387398","full_name":"ksylvest/mupdf","owner":"ksylvest","description":"A Ruby library for using MuPDF","archived":false,"fork":false,"pushed_at":"2025-06-18T00:00:11.000Z","size":26,"stargazers_count":25,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-18T01:18:32.048Z","etag":null,"topics":["mupdf","ruby"],"latest_commit_sha":null,"homepage":"https://mupdf.ksylvest.com/","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/ksylvest.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2025-01-02T22:35:53.000Z","updated_at":"2025-06-18T00:00:14.000Z","dependencies_parsed_at":"2025-01-02T23:02:12.526Z","dependency_job_id":"6f8c8489-abfc-4af6-926d-d05d1fe1b46d","html_url":"https://github.com/ksylvest/mupdf","commit_stats":null,"previous_names":["ksylvest/mupdf"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/ksylvest/mupdf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksylvest%2Fmupdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksylvest%2Fmupdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksylvest%2Fmupdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksylvest%2Fmupdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ksylvest","download_url":"https://codeload.github.com/ksylvest/mupdf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ksylvest%2Fmupdf/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260466163,"owners_count":23013457,"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":["mupdf","ruby"],"created_at":"2025-01-10T23:54:29.783Z","updated_at":"2025-06-20T20:33:43.183Z","avatar_url":"https://github.com/ksylvest.png","language":"Ruby","readme":"# MuPDF\n\n[![LICENSE](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/ksylvest/mupdf/blob/main/LICENSE)\n[![RubyGems](https://img.shields.io/gem/v/mupdf)](https://rubygems.org/gems/mupdf)\n[![GitHub](https://img.shields.io/badge/github-repo-blue.svg)](https://github.com/ksylvest/mupdf)\n[![Yard](https://img.shields.io/badge/docs-site-blue.svg)](https://mupdf.ksylvest.com)\n[![CircleCI](https://img.shields.io/circleci/build/github/ksylvest/mupdf)](https://circleci.com/gh/ksylvest/mupdf)\n\n## Installation\n\n```bash\ngem install mupdf\n```\n\n_This project requires `mutool` be installed on your system. To verify ensure the following works:_\n\n```bash\nmutool\n```\n\nTo install `mutool` on MacOS use:\n\n```bash\nbrew install mupdf\n```\n\nTo install `mutool` on Ubuntu use:\n\n```bash\napt-get install mupdf\n```\n\n## Usage\n\n### Document\n\nA `MuPDF::Document` wraps a PDF file:\n\n```ruby\ndocument = MuPDF::Document.new('./file.pdf')\n```\n\n#### Info\n\nThe `info` command displays information about the document such as the number of pages:\n\n```ruby\ninfo = document.info\ninfo.pages # e.g. 2\n```\n\n#### Pages\n\nThe `pages` command finds sizing information about the pages within a document:\n\n```ruby\npages = document.pages\npages.count # e.g. 2\npages.each do |page|\n  page.number # e.g. 1, 2, ...\n  page.width # 612\n  page.height # 792\nend\n```\n\n#### Draw\n\nThe `draw` command is useful for converting a document between formats:\n\n```ruby\ndocument.pages.each do |page|\n  document.draw(page: page.number, format: \"png\", path: \"./file-#{page.number}.png\")\nend\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksylvest%2Fmupdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fksylvest%2Fmupdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fksylvest%2Fmupdf/lists"}