{"id":22916662,"url":"https://github.com/synergitech/chrome-pdf-php","last_synced_at":"2026-03-07T23:02:08.875Z","repository":{"id":33653992,"uuid":"160386166","full_name":"SynergiTech/chrome-pdf-php","owner":"SynergiTech","description":"PHP library to render PDFs in Chrome via chrome-pdf or Browserless","archived":false,"fork":false,"pushed_at":"2024-11-26T16:58:19.000Z","size":112,"stargazers_count":2,"open_issues_count":2,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-12T17:03:51.823Z","etag":null,"topics":["browserless","chrome","chrome-pdf","pdf","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/SynergiTech.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":"2018-12-04T16:22:15.000Z","updated_at":"2025-03-17T16:47:25.000Z","dependencies_parsed_at":"2023-11-28T10:28:58.851Z","dependency_job_id":"5d74b8d3-42fc-4014-8158-57b777669963","html_url":"https://github.com/SynergiTech/chrome-pdf-php","commit_stats":{"total_commits":49,"total_committers":6,"mean_commits":8.166666666666666,"dds":0.6122448979591837,"last_synced_commit":"6971a40c58784de9927f1981ff681ece6b677578"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SynergiTech%2Fchrome-pdf-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SynergiTech%2Fchrome-pdf-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SynergiTech%2Fchrome-pdf-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SynergiTech%2Fchrome-pdf-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SynergiTech","download_url":"https://codeload.github.com/SynergiTech/chrome-pdf-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253784908,"owners_count":21963899,"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":["browserless","chrome","chrome-pdf","pdf","php"],"created_at":"2024-12-14T06:14:09.956Z","updated_at":"2026-03-07T23:02:08.779Z","avatar_url":"https://github.com/SynergiTech.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP ChromePDF Renderer\n[![Tests](https://github.com/SynergiTech/chrome-pdf-php/actions/workflows/main.yml/badge.svg)](https://github.com/SynergiTech/chrome-pdf-php/actions/workflows/main.yml)\n\n_For pre-V1 documentation [click here](https://github.com/SynergiTech/chrome-pdf-php/blob/v0/README.md)_\n\n_For pre-V3 documentation [click here](https://github.com/SynergiTech/chrome-pdf-php/blob/v2/README.md)_\n\nThis is a library for creating PDFs from HTML rendered with the SkPDF backend via Chrome. In order to do this, you can opt to use one of the supported drivers:\n* [SynergiTech/chrome-pdf](https://github.com/SynergiTech/chrome-pdf)\n* [Browserless](https://www.browserless.io/)\n\n## Installation\n```\ncomposer require synergitech/chrome-pdf-php\n```\n### chrome-pdf\nIf you are planning to use the [`chrome-pdf`](https://github.com/SynergiTech/chrome-pdf) driver to render PDFs locally, you should also make sure to install this from npm.\n\n### Browserless\nIf you are planning to use the [Browserless](https://www.browserless.io/) driver to render PDFs remotely or take screenshots, you should register for an API key. Remember that local assets cannot be rendered by Browserless.\n\n## Usage\nA common interface is provided via AbstractPDF. The options presented via this class will be available from all drivers.\n\nYou should instantiate one of the available drivers, potentially passing options required by the driver:\n```php\nuse SynergiTech\\ChromePDF\\Chrome;\nuse SynergiTech\\ChromePDF\\Browserless;\n\n$pdf = new Chrome('path-to-chrome-pdf');\n$pdf-\u003erenderContent('\u003ch1\u003etest\u003c/h1\u003e');\n\n$pdf = new Browserless('your-api-key');\n$pdf-\u003erenderContent('\u003ch1\u003etest\u003c/h1\u003e');\n```\n\n### Advanced Browserless Usage\n\nYou can optionally use specific endpoints when you create a client.\n\n```php\nuse SynergiTech\\ChromePDF\\Browserless;\n\n$pdf = new Browserless('your-api-key', Browserless\\EndpointsEnum::London);\n```\n\nAs this library essentially functions as an API client for Browserless, we have also implemented the screenshot API.\n\n```php\nuse SynergiTech\\ChromePDF\\Browserless;\n\n// For information on options, see https://www.browserless.io/docs/screenshot#custom-options.\n// `render()` defaults to using png and fullPage set to false\n// but jpegs will get a quality of 75 set if you don't set one\n$file = new Browserless\\Screenshot('your-api-key');\n$file-\u003erender('https://example.com');\n$file-\u003erender('https://example.com', [\n    'fullPage' =\u003e true,\n    'type' =\u003e 'jpeg',\n]);\n```\n\n## Examples\nSome examples can be found in the `examples` folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynergitech%2Fchrome-pdf-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsynergitech%2Fchrome-pdf-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsynergitech%2Fchrome-pdf-php/lists"}