{"id":13396085,"url":"https://github.com/barryvdh/laravel-dompdf","last_synced_at":"2025-09-09T20:39:44.953Z","repository":{"id":9103165,"uuid":"10883164","full_name":"barryvdh/laravel-dompdf","owner":"barryvdh","description":"A DOMPDF Wrapper for Laravel","archived":false,"fork":false,"pushed_at":"2025-05-14T11:57:29.000Z","size":187,"stargazers_count":7030,"open_issues_count":101,"forks_count":986,"subscribers_count":111,"default_branch":"master","last_synced_at":"2025-07-07T23:49:48.068Z","etag":null,"topics":["hacktoberfest","laravel","pdf"],"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/barryvdh.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":"barryvdh","custom":["https://fruitcake.nl"]}},"created_at":"2013-06-23T11:27:07.000Z","updated_at":"2025-07-03T19:27:16.000Z","dependencies_parsed_at":"2024-08-09T14:12:04.389Z","dependency_job_id":"7b086804-0a1e-4880-bd9a-526074a41aa8","html_url":"https://github.com/barryvdh/laravel-dompdf","commit_stats":{"total_commits":182,"total_committers":55,"mean_commits":3.309090909090909,"dds":"0.42307692307692313","last_synced_commit":"48c3ed8f7954319daf441ac4a046cd8137dab053"},"previous_names":[],"tags_count":51,"template":false,"template_full_name":null,"purl":"pkg:github/barryvdh/laravel-dompdf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barryvdh%2Flaravel-dompdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barryvdh%2Flaravel-dompdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barryvdh%2Flaravel-dompdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barryvdh%2Flaravel-dompdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barryvdh","download_url":"https://codeload.github.com/barryvdh/laravel-dompdf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barryvdh%2Flaravel-dompdf/sbom","scorecard":{"id":226127,"data":{"date":"2025-08-11","repo":{"name":"github.com/barryvdh/laravel-dompdf","commit":"133f06fc977518789e0df76a5ed9fc934afec542"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Code-Review","score":6,"reason":"Found 19/30 approved changesets -- score normalized to 6","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 24 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T03:52:11.040Z","repository_id":9103165,"created_at":"2025-08-17T03:52:11.040Z","updated_at":"2025-08-17T03:52:11.040Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274358598,"owners_count":25270679,"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-09-09T02:00:10.223Z","response_time":80,"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":["hacktoberfest","laravel","pdf"],"created_at":"2024-07-30T18:00:39.460Z","updated_at":"2025-09-09T20:39:44.923Z","avatar_url":"https://github.com/barryvdh.png","language":"PHP","funding_links":["https://github.com/sponsors/barryvdh","https://fruitcake.nl"],"categories":["Popular Packages","PHP","Paquetes utiles","后端开发框架及项目","Packages","PDF","Miscellaneous"],"sub_categories":["PHP开发","Helpers/General"],"readme":"## DOMPDF Wrapper for Laravel\n\n### Laravel wrapper for [Dompdf HTML to PDF Converter](https://github.com/dompdf/dompdf)\n\n[![Tests](https://github.com/barryvdh/laravel-dompdf/workflows/Tests/badge.svg)](https://github.com/barryvdh/laravel-dompdf/actions)\n[![Packagist License](https://img.shields.io/badge/Licence-MIT-blue)](http://choosealicense.com/licenses/mit/)\n[![Latest Stable Version](https://img.shields.io/packagist/v/barryvdh/laravel-dompdf?label=Stable)](https://packagist.org/packages/barryvdh/laravel-dompdf)\n[![Total Downloads](https://img.shields.io/packagist/dt/barryvdh/laravel-dompdf.svg?label=Downloads)](https://packagist.org/packages/barryvdh/laravel-dompdf)\n[![Fruitcake](https://img.shields.io/badge/Powered%20By-Fruitcake-b2bc35.svg)](https://fruitcake.nl/)\n\n## Installation\n\n### Laravel\nRequire this package in your composer.json and update composer. This will download the package and the dompdf + fontlib libraries also.\n\n    composer require barryvdh/laravel-dompdf\n\n### Lumen\n\nAfter updating composer add the following lines to register provider in `bootstrap/app.php`\n\n  ```\n  $app-\u003eregister(\\Barryvdh\\DomPDF\\ServiceProvider::class);\n  ```\n  \nTo change the configuration, copy the config file to your config folder and enable it in `bootstrap/app.php`:\n\n  ```\n  $app-\u003econfigure('dompdf');\n  ```\n  \n## Using\n\nYou can create a new DOMPDF instance and load a HTML string, file or view name. You can save it to a file, or stream (show in browser) or download.\n\n```php\n    use Barryvdh\\DomPDF\\Facade\\Pdf;\n\n    $pdf = Pdf::loadView('pdf.invoice', $data);\n    return $pdf-\u003edownload('invoice.pdf');\n```\n\nor use the App container:\n\n```php\n    $pdf = App::make('dompdf.wrapper');\n    $pdf-\u003eloadHTML('\u003ch1\u003eTest\u003c/h1\u003e');\n    return $pdf-\u003estream();\n```\n\nOr use the facade:\n\nYou can chain the methods:\n\n```php\n    return Pdf::loadFile(public_path().'/myfile.html')-\u003esave('/path-to/my_stored_file.pdf')-\u003estream('download.pdf');\n```\n\nYou can change the orientation and paper size, and hide or show errors (by default, errors are shown when debug is on)\n\n```php\n    Pdf::loadHTML($html)-\u003esetPaper('a4', 'landscape')-\u003esetWarnings(false)-\u003esave('myfile.pdf')\n```\n\nIf you need the output as a string, you can get the rendered PDF with the output() function, so you can save/output it yourself.\n\nUse `php artisan vendor:publish` to create a config file located at `config/dompdf.php` which will allow you to define local configurations to change some settings (default paper etc).\nYou can also use your ConfigProvider to set certain keys.\n\n### Configuration\nThe defaults configuration settings are set in `config/dompdf.php`. Copy this file to your own config directory to modify the values. You can publish the config using this command:\n```shell\n    php artisan vendor:publish --provider=\"Barryvdh\\DomPDF\\ServiceProvider\"\n```\n\nYou can still alter the dompdf options in your code before generating the pdf using this command:\n```php\n    Pdf::setOption(['dpi' =\u003e 150, 'defaultFont' =\u003e 'sans-serif']);\n```\n    \nAvailable options and their defaults:\n* __rootDir__: \"{app_directory}/vendor/dompdf/dompdf\"\n* __tempDir__: \"/tmp\" _(available in config/dompdf.php)_\n* __fontDir__: \"{app_directory}/storage/fonts\" _(available in config/dompdf.php)_\n* __fontCache__: \"{app_directory}/storage/fonts\" _(available in config/dompdf.php)_\n* __chroot__: \"{app_directory}\" _(available in config/dompdf.php)_\n* __logOutputFile__: \"/tmp/log.htm\"\n* __defaultMediaType__: \"screen\" _(available in config/dompdf.php)_\n* __defaultPaperSize__: \"a4\" _(available in config/dompdf.php)_\n* __defaultFont__: \"serif\" _(available in config/dompdf.php)_\n* __dpi__: 96 _(available in config/dompdf.php)_\n* __fontHeightRatio__: 1.1 _(available in config/dompdf.php)_\n* __isPhpEnabled__: false _(available in config/dompdf.php)_\n* __isRemoteEnabled__: false _(available in config/dompdf.php)_\n* __isJavascriptEnabled__: true _(available in config/dompdf.php)_\n* __isHtml5ParserEnabled__: true _(available in config/dompdf.php)_\n* __allowedRemoteHosts__: null _(available in config/dompdf.php)_\n* __isFontSubsettingEnabled__: false _(available in config/dompdf.php)_\n* __debugPng__: false\n* __debugKeepTemp__: false\n* __debugCss__: false\n* __debugLayout__: false\n* __debugLayoutLines__: true\n* __debugLayoutBlocks__: true\n* __debugLayoutInline__: true\n* __debugLayoutPaddingBox__: true\n* __pdfBackend__: \"CPDF\" _(available in config/dompdf.php)_\n* __pdflibLicense__: \"\"\n* __adminUsername__: \"user\"\n* __adminPassword__: \"password\"\n* __artifactPathValidation__: null _(available in config/dompdf.php)_\n\n#### Note: Since 3.x the remote access is disabled by default, to provide more security. Use with caution!\n\n### Tip: UTF-8 support\nIn your templates, set the UTF-8 Metatag:\n\n    \u003cmeta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/\u003e\n\n### Tip: Page breaks\nYou can use the CSS `page-break-before`/`page-break-after` properties to create a new page.\n\n    \u003cstyle\u003e\n    .page-break {\n        page-break-after: always;\n    }\n    \u003c/style\u003e\n    \u003ch1\u003ePage 1\u003c/h1\u003e\n    \u003cdiv class=\"page-break\"\u003e\u003c/div\u003e\n    \u003ch1\u003ePage 2\u003c/h1\u003e\n    \n### License\n\nThis DOMPDF Wrapper for Laravel is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarryvdh%2Flaravel-dompdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarryvdh%2Flaravel-dompdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarryvdh%2Flaravel-dompdf/lists"}