{"id":27974267,"url":"https://github.com/openprinting/libpdfrip","last_synced_at":"2026-02-11T00:01:48.769Z","repository":{"id":278287211,"uuid":"935124191","full_name":"OpenPrinting/libpdfrip","owner":"OpenPrinting","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-10T08:46:38.000Z","size":817,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-01-11T02:46:10.608Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OpenPrinting.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-19T00:08:37.000Z","updated_at":"2026-01-10T08:46:41.000Z","dependencies_parsed_at":"2025-02-19T01:23:36.836Z","dependency_job_id":"7c6dd6cd-e73d-4314-aa3e-2309dab61cf3","html_url":"https://github.com/OpenPrinting/libpdfrip","commit_stats":null,"previous_names":["openprinting/libpdfrip"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/OpenPrinting/libpdfrip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenPrinting%2Flibpdfrip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenPrinting%2Flibpdfrip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenPrinting%2Flibpdfrip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenPrinting%2Flibpdfrip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OpenPrinting","download_url":"https://codeload.github.com/OpenPrinting/libpdfrip/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OpenPrinting%2Flibpdfrip/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29322733,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T20:44:44.282Z","status":"ssl_error","status_checked_at":"2026-02-10T20:44:43.393Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2025-05-08T00:13:34.344Z","updated_at":"2026-02-11T00:01:48.764Z","avatar_url":"https://github.com/OpenPrinting.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libpdfrip\n\nlibpdfrip is a high-performance PDF rendering and analysis tool built on top of **libpdfio** and the **Cairo 2D** graphics library. It provides efficient page rendering to PNG format and includes a content stream inspection utility for debugging and development.\n\n## Features\n\n* Render individual PDF pages directly to PNG.\n* Configurable output resolution (DPI).\n* Content stream analysis mode for inspecting PDF operator usage.\n* Optional verbose logging for detailed diagnostics.\n* Flexible output naming conventions to support automation and testing.\n\n## Dependencies\n\nThe following libraries and tools must be installed:\n\n* C compiler (gcc or clang)\n* make\n* pkg-config\n* libpdfio (development headers)\n* cairo (development headers)\n* freetype2 (development headers)\n* libpng (development headers)\n\n### Debian/Ubuntu Installation\n\n```\nsudo apt-get install build-essential pkg-config libpdfio-dev libcairo2-dev libfreetype6-dev libpng-dev\n```\n\n## Building\n\n```\ngit clone https://github.com/OpenPrinting/libpdfrip.git\ncd libpdfrip\nmake\n```\n\nThis produces:\n\n* `pdf2cairo/pdf2cairo_main` – primary rendering and analysis tool\n* `testpdf2cairo` – test runner\n\n## Usage\n\n```\n./pdf2cairo/pdf2cairo_main [options] input.pdf\n```\n\n### Options\n\n| Flag        | Argument       | Description                                                        |\n| ----------- | -------------- | ------------------------------------------------------------------ |\n| `--analyze` |                | Analyze PDF content streams instead of rendering output.           |\n| `--help`    |                | Display usage information.                                         |\n| `-o`        | `\u003coutput.png\u003e` | Output PNG filename when rendering.                                |\n| `-p`        | `\u003cpagenum\u003e`    | Page number to process (default: 1).                               |\n| `-r`        | `\u003cdpi\u003e`        | Output resolution in DPI (default: 72).                            |\n| `-t`        |                | Generate a temporary output filename (requires `-d`).              |\n| `-d`        | `\u003cdirectory\u003e`  | Output directory when using `-t`.                                  |\n| `-T`        |                | Generate a temporary filename inside `testfiles/renderer-output/`. |\n| `-v`        |                | Enable verbose diagnostic output.                                  |\n\n### Examples\n\nRender page 1 to PNG:\n\n```\n./pdf2cairo/pdf2cairo_main -o output.png document.pdf\n```\n\nRender page 5 at 300 DPI:\n\n```\n./pdf2cairo/pdf2cairo_main -p 5 -r 300 -o high-res.png document.pdf\n```\n\nAnalyze page 2 content stream:\n\n```\n./pdf2cairo/pdf2cairo_main --analyze -p 2 document.pdf\n```\n\n## Testing\n\n```\nmake test\n```\n\nTest output images are written to:\n\n```\ntestfiles/renderer-output/\n```\n\n## Contributing\n\nContributions are welcomed. All pull requests must:\n\n* Pass the existing test suite (`make test`).\n* Follow the current code structure and formatting conventions.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenprinting%2Flibpdfrip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenprinting%2Flibpdfrip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenprinting%2Flibpdfrip/lists"}