{"id":14974857,"url":"https://github.com/typesetsh/laravel-wrapper","last_synced_at":"2025-10-27T10:30:57.798Z","repository":{"id":56412741,"uuid":"280968805","full_name":"typesetsh/laravel-wrapper","owner":"typesetsh","description":"typeset.sh wrapper for Laravel 7 - 11","archived":false,"fork":false,"pushed_at":"2024-03-13T11:36:17.000Z","size":29,"stargazers_count":22,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"laravel-7","last_synced_at":"2025-02-12T06:05:02.093Z","etag":null,"topics":["laravel","laravel10","laravel11","laravel7","laravel8","laravel9","pdf","typesetsh"],"latest_commit_sha":null,"homepage":"https://typeset.sh/en/","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/typesetsh.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}},"created_at":"2020-07-19T23:30:20.000Z","updated_at":"2024-03-13T11:37:20.000Z","dependencies_parsed_at":"2024-01-30T14:53:09.987Z","dependency_job_id":null,"html_url":"https://github.com/typesetsh/laravel-wrapper","commit_stats":{"total_commits":26,"total_committers":4,"mean_commits":6.5,"dds":"0.46153846153846156","last_synced_commit":"9486cec5105e9c46cbb20939f62cf5b0e7d52d2f"},"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typesetsh%2Flaravel-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typesetsh%2Flaravel-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typesetsh%2Flaravel-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typesetsh%2Flaravel-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/typesetsh","download_url":"https://codeload.github.com/typesetsh/laravel-wrapper/tar.gz/refs/heads/laravel-7","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238480607,"owners_count":19479520,"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":["laravel","laravel10","laravel11","laravel7","laravel8","laravel9","pdf","typesetsh"],"created_at":"2024-09-24T13:51:10.851Z","updated_at":"2025-10-27T10:30:57.793Z","avatar_url":"https://github.com/typesetsh.png","language":"PHP","readme":"\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://static.typeset.sh/images/typeset.sh-logo.svg\" width=\"300\"\u003e\u003c/p\u003e\n\n\n# Typeset.sh wrapper for Laravel 7, 8, 9, 10, 11 and 12\n\nThis is a laravel typeset.sh wrapper that lets you easily configure and use typeset.sh\nin your laravel project. Typeset.sh is a printcss layout and rendering engine written in PHP.\n\n\n## Installation\n\nMake sure you have access to a valid composer token from typeset.sh.\n\nAdd typeset.sh package repository to composer and install the package via composer:\n\n    composer config repositories.typesetsh composer https://packages.typeset.sh\n    composer require typesetsh/laravel-wrapper\n\nThe package will be automatically discovered in your application thanks to [package auto-discovery](https://laravel.com/docs/8.x/packages#package-discovery).\n\n## Usage\n\nThe wrapper works similar to the view. Technically it wraps the view and uses its html output\nand renders it as pdf.\n\n### Facade\n\nYou can use the facade pattern. Similar as you would render a view.\n\n```php\nuse Typesetsh\\LaravelWrapper\\Facades\\Pdf;\n\nRoute::get('/invoice/print', function () {\n    $invoice = new stdClass();\n\n    return Pdf::make('invoice', ['invoice' =\u003e $invoice]);\n});\n```\n\n\n### Helper\n\nAlternative you can use the helper.\n\n```php\n\nRoute::get('/invoice/print', function () {\n    $invoice = new stdClass();\n\n    return Typesetsh\\pdf('invoice', ['invoice' =\u003e $invoice]);\n});\n```\n\nor force a download\n\n```php\n\nRoute::get('/invoice/print', function () {\n    $invoice = new stdClass();\n\n    return Typesetsh\\pdf('invoice', ['invoice' =\u003e $invoice])-\u003eforceDownload('invoice.pdf');\n});\n```\n\nor assign a save handler.\n\n```php\nuse Typesetsh\\HtmlToPdf\\StandardEncryption;\nuse Typesetsh\\Pdf\\Security\\Encryption\\Standard\\Permission;\n\nRoute::get('/invoice/print', function () {\n    $invoice = new stdClass();\n\n    return Typesetsh\\pdf('invoice', ['invoice' =\u003e $invoice])\n        -\u003ewith(new StandardEncryption(\"owner123\", \"user123\", Permission::FORMS));\n});\n```\n\n## Configuration\n\nTypeset.sh does not require much configuration. The only important aspect to understand is that\nby default typeset.sh does not allow including any external resources (image, css, fonts,...)\nunless specified.\n\nSee the configuration file `config/typesetsh.php` for more information. By default, typeset.sh\nhas access to the public directory and any http(s) resources.\n\nYou can also publish the file using:\n\n    php artisan vendor:publish --provider=\"Typesetsh\\LaravelWrapper\\ServiceProvider\"\n\n\n## License\n\nThis extension is under the [MIT license](LICENSE).\n\nHowever, it requires a version of [typeset.sh](https://typeset.sh/) to work.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypesetsh%2Flaravel-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftypesetsh%2Flaravel-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypesetsh%2Flaravel-wrapper/lists"}