{"id":15672650,"url":"https://github.com/threez/hpdf.cr","last_synced_at":"2025-10-16T18:32:54.647Z","repository":{"id":50377035,"uuid":"517949498","full_name":"threez/hpdf.cr","owner":"threez","description":"Create PDF documents in crystal using libhpdf / libharu","archived":false,"fork":false,"pushed_at":"2024-04-21T16:46:58.000Z","size":3789,"stargazers_count":16,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T03:12:00.759Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Crystal","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/threez.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":"2022-07-26T07:00:25.000Z","updated_at":"2025-03-30T00:57:31.000Z","dependencies_parsed_at":"2024-04-21T18:57:13.352Z","dependency_job_id":"8285a33a-97d1-4d87-a3b4-565c5827b4ed","html_url":"https://github.com/threez/hpdf.cr","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threez%2Fhpdf.cr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threez%2Fhpdf.cr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threez%2Fhpdf.cr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/threez%2Fhpdf.cr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/threez","download_url":"https://codeload.github.com/threez/hpdf.cr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252775826,"owners_count":21802454,"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":[],"created_at":"2024-10-03T15:29:32.908Z","updated_at":"2025-10-16T18:32:49.592Z","avatar_url":"https://github.com/threez.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hpdf [![.github/workflows/ci.yml](https://github.com/threez/hpdf.cr/actions/workflows/ci.yml/badge.svg)](https://github.com/threez/hpdf.cr/actions/workflows/ci.yml) [![https://threez.github.io/hpdf.cr/](https://badgen.net/badge/api/documentation/green)](https://threez.github.io/hpdf.cr/)\n\nShard to create PDF documents with crystal using [libharu/libhpdf](https://github.com/libharu/libharu/).\n\nExample renderings of the example files and specs: \n\n[![montage](montage.png)](pdfs).\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n   ```yaml\n   dependencies:\n     hpdf:\n       github: threez/hpdf.cr\n   ```\n\n2. Run `shards install`\n\n## Usage\n\n```crystal\nrequire \"hpdf\"\n\npdf = Hpdf::Doc.build do\n  page do\n    draw_rectangle 50, 50, width - 100, height - 110\n\n    text Hpdf::Base14::Helvetica, 70 do\n      text_out :center, :center, \"Hello World\"\n    end\n  end\nend\n\npdf.save_to_file \"hello.pdf\"\n\n```\n\n## C library dependencies\n\nBefore usage you have to install the library **libharu** which\ndepends on **libpng** and **zlib**:\n\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\u003cth\u003eSystem\u003c/th\u003e\u003cth\u003eCommand\u003c/th\u003e\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\u003ctd\u003eAlpine\u003c/td\u003e\u003ctd\u003e\u003ccode\u003eapk add libharu\u003c/code\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eDebian/Ubuntu\u003c/td\u003e\u003ctd\u003e\u003ccode\u003esudo apt install libhpdf-dev\u003c/code\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eCentos\u003c/td\u003e\u003ctd\u003e\u003ccode\u003esudo yum install libharu-devel\u003c/code\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eFedora/Redhat\u003c/td\u003e\u003ctd\u003e\u003ccode\u003esudo dnf install libharu-devel\u003c/code\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eFreeBSD\u003c/td\u003e\u003ctd\u003e\u003ccode\u003epkg install libharu\u003c/code\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003eOpenBSD\u003c/td\u003e\u003ctd\u003e\u003ccode\u003epkg_add libharu\u003c/code\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003emacOS\u003c/td\u003e\u003ctd\u003e\u003ccode\u003ebrew install libharu\u003c/code\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctbody\u003e\n\u003c/table\u003e\n\n## Development\n\nUse the examples to write demos. Read about *libharu* here:\n\n* http://libharu.sourceforge.net/index.html\n* https://github.com/libharu/libharu/wiki\n\n## Contributing\n\n1. Fork it (https://github.com/threez/hpdf.cr/fork)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Contributors\n\n- [Vincent Landgraf](https://github.com/threez) - creator and maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreez%2Fhpdf.cr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthreez%2Fhpdf.cr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreez%2Fhpdf.cr/lists"}