{"id":33963373,"url":"https://github.com/restpackio/restpack-php","last_synced_at":"2025-12-12T22:35:32.614Z","repository":{"id":38183606,"uuid":"129259647","full_name":"restpackio/restpack-php","owner":"restpackio","description":"Restpack.io PHP client for HTML to PDF API, and Screenshot API","archived":false,"fork":false,"pushed_at":"2023-04-19T20:49:38.000Z","size":16,"stargazers_count":1,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-28T03:32:27.188Z","etag":null,"topics":["html2pdf","restpack","screenshot"],"latest_commit_sha":null,"homepage":"https://restpack.io","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/restpackio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-12T13:56:58.000Z","updated_at":"2021-04-30T11:14:15.000Z","dependencies_parsed_at":"2022-08-31T09:01:41.436Z","dependency_job_id":null,"html_url":"https://github.com/restpackio/restpack-php","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/restpackio/restpack-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restpackio%2Frestpack-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restpackio%2Frestpack-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restpackio%2Frestpack-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restpackio%2Frestpack-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/restpackio","download_url":"https://codeload.github.com/restpackio/restpack-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/restpackio%2Frestpack-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27693610,"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","status":"online","status_checked_at":"2025-12-12T02:00:06.775Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["html2pdf","restpack","screenshot"],"created_at":"2025-12-12T22:35:31.346Z","updated_at":"2025-12-12T22:35:32.597Z","avatar_url":"https://github.com/restpackio.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# reastpack-php\n\nOfficial PHP client for Restpack APIs\n\n## Installation\n\nRequires PHP 5.6.\n\nThe recommended way to install restpack-php is through [Composer](https://getcomposer.org):\n\nFirst, install Composer:\n\n```\n$ curl -sS https://getcomposer.org/installer | php\n```\n\nNext, install the latest restpack-php:\n\n```\n$ php composer.phar require restpackio/restpack-php\n```\n\nFinally, you need to require the library in your PHP application:\n\n```php\nrequire \"vendor/autoload.php\";\n```\n\n## Screenshot API\n\nFor detailed documentation, please visit [Screenshot API v6 Reference page](https://restpack.io/screenshot/docs).\n\n```php\n$screenshot = new Restpack\\Screenshot(\"\u003cYOUR ACCESS TOKEN\u003e\");\n\n// Capture given URL. Return the document details and CDN url of the Image\n$screenshot-\u003ecapture(\"http://google.com\", [ \"format\" =\u003e \"png\" /* , other options */ ])\n\n// Capture given html content. Return the document details and CDN url of the Image\n$screenshot-\u003ecaptureHTML(\"\u003cp\u003e\u003cb\u003eBold text\u003c/b\u003e etc\u003c/p\u003e\", [ \"format\" =\u003e \"png\" /* , other options */ ])\n\n// Capture given URL. Return the image file as Buffer\n$screenshot-\u003ecaptureToImage(\"http://google.com\", [ \"format\" =\u003e \"png\" /* , other options */ ])\n\n// Capture given html content. Return the image file as Buffer\n$screenshot-\u003ecaptureHTMLToImage(\"\u003cp\u003e\u003cb\u003eBold text\u003c/b\u003e etc\u003c/p\u003e\", [ \"format\" =\u003e \"png\" /* , other options */ ])\n```\n\n## HTML To PDF API\n\nFor detailed documentation, please visit [HTML to PDF API v5 Reference page](https://restpack.io/html2pdf/docs).\n    \n```php\n$htmlpdf = new Restpack\\HTMLToPDF(\"\u003cYOUR ACCESS TOKEN\u003e\");\n\n// Convert given URL to PDF. Return the document details and CDN url of PDF\n$htmlpdf-\u003econvert(\"http://google.com\", [ \"pdf_page\" =\u003e \"A4\" /* , other options */ ])\n\n// Convert given html content to PDF. Return the document details and CDN url of PDF\n$htmlpdf-\u003econvertHTML(\"\u003cp\u003e\u003cb\u003eBold text\u003c/b\u003e etc\u003c/p\u003e\", [ \"pdf_page\" =\u003e \"A4\" /* , other options */ ])\n\n// Convert given URL to PDF. Return the PDF document as Buffer\n$htmlpdf-\u003econvertToPDF(\"http://google.com\", [ \"pdf_page\" =\u003e \"A4\" /* , other options */ ])\n\n// Convert given html content to PDF. Return the PDF document as Buffer\n$htmlpdf-\u003econvertHTMLToPDF(\"\u003cp\u003e\u003cb\u003eBold text\u003c/b\u003e etc\u003c/p\u003e\", [ \"pdf_page\" =\u003e \"A4\" /* , other options */ ])\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frestpackio%2Frestpack-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frestpackio%2Frestpack-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frestpackio%2Frestpack-php/lists"}