Repository: barryvdh/laravel-dompdf
Branch: master
Commit: ee3b72b19ccd
Files: 23
Total size: 55.5 KB
Directory structure:
gitextract_212oewmi/
├── .editorconfig
├── .gitattributes
├── .github/
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE/
│ │ ├── bug_report.md
│ │ └── config.yml
│ ├── stale.yml
│ └── workflows/
│ ├── run-static-analysis.yml
│ └── run-tests.yml
├── .gitignore
├── CHANGELOG.md
├── LICENSE
├── composer.json
├── config/
│ └── dompdf.php
├── grumphp.yml
├── phpstan.neon
├── phpunit.xml.dist
├── readme.md
├── src/
│ ├── Facade/
│ │ └── Pdf.php
│ ├── PDF.php
│ └── ServiceProvider.php
└── tests/
├── PdfTest.php
├── TestCase.php
└── views/
└── test.blade.php
================================================
FILE CONTENTS
================================================
================================================
FILE: .editorconfig
================================================
root = true
[*]
charset = utf-8
indent_size = 4
indent_style = space
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
[*.{yml,yaml}]
indent_size = 2
================================================
FILE: .gitattributes
================================================
* text=auto
/.github export-ignore
/tests export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
changelog.md export-ignore
grumphp.yml export-ignore
phpstan.neon export-ignore
phpunit.xml.dist export-ignore
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
github: barryvdh
custom: ['https://fruitcake.nl']
================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Report an issue with the Dompdf wrapper
title: ''
labels: ''
assignees: ''
---
**This is just a Dompdf wrapper!**
I understand that this package is just a Laravel wrapper for https://github.com/dompdf/dompdf
Any issues with PDF rendering, CSS that is not applied correctly, aligning/fonts/characters etc that are not directly related to this package, should be reported there. When having doubts, please try to reproduce the issue with just dompdf. If it's also present there, do not open an issue here please.
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
- Laravel and package version
- Input HTML/CSS
- Options / code
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here.
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false
contact_links:
- name: Report CSS/HTML Bug
url: https://github.com/dompdf/dompdf/issues/new?title=[CSS/HTML]:%20
about: 'Any issues with PDF rendering are not directly related to this package, should be reported to dompdf/dompdf'
- name: Report FONTs/Characters/Encoding Bug
url: https://github.com/dompdf/dompdf/issues/new?title=[FONTs]:%20
about: 'Any issues with fonts rendering are not directly related to this package, should be reported to dompdf/dompdf'
- name: Feature request
url: https://github.com/dompdf/dompdf/discussions/new?category=ideas&title=[ENHANCEMENT]:%20
about: 'For ideas or feature requests, start a new discussion'
- name: Support Questions & Other
url: https://github.com/dompdf/dompdf/discussions/new?category=q-a&title=[SUPPORT]:%20
about: 'This space is only for reporting bugs. If you have a question or need help use discussions, click:'
================================================
FILE: .github/stale.yml
================================================
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- bug
- enhancement
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs.
Any issues with PDF rendering itself that are not directly related to this package,
should be reported on https://github.com/dompdf/dompdf instead.
When having doubts, please try to reproduce the issue with just dompdf.
If you believe this is an actual issue with the latest version of laravel-dompdf,
please reply to this issue so we can investigate further.
Thank you for your contribution! Apologies for any delayed response on our side.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
# Limit to only `issues` or `pulls`
only: issues
================================================
FILE: .github/workflows/run-static-analysis.yml
================================================
name: Static Analysis
on:
push:
branches:
- master
pull_request:
branches:
- "*"
jobs:
php-tests:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
COMPOSER_NO_INTERACTION: 1
strategy:
fail-fast: false
matrix:
php: [8.1, 8.2, 8.3, 8.4, 8.5]
laravel: ['9.*', '10.*', '11.*', '12.*', '13.*']
dependency-version: [prefer-stable]
exclude:
- laravel: 12.*
php: 8.1
- laravel: 11.*
php: 8.1
- laravel: 10.*
php: 8.5
- laravel: 9.*
php: 8.5
- laravel: 13.*
php: 8.1
- laravel: 13.*
php: 8.2
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: mbstring
- name: Install dependencies
run: |
composer remove phpro/grumphp --no-update --dev
composer require "laravel/framework:${{ matrix.laravel }}" --no-update --no-progress
composer update --${{ matrix.dependency-version }} --prefer-dist --no-progress
- name: Run Static Analysis
run: composer phpstan
================================================
FILE: .github/workflows/run-tests.yml
================================================
name: Tests
on:
push:
branches:
- master
pull_request:
branches:
- "*"
jobs:
php-tests:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
COMPOSER_NO_INTERACTION: 1
strategy:
fail-fast: false
matrix:
php: [8.1, 8.2, 8.3, 8.4, 8.5]
laravel: ['9.*', '10.*', '11.*', '12.*', '13.*']
dependency-version: [prefer-lowest, prefer-stable]
exclude:
- laravel: 12.*
php: 8.1
- laravel: 11.*
php: 8.1
- laravel: 10.*
php: 8.5
- laravel: 9.*
php: 8.5
- laravel: 13.*
php: 8.1
- laravel: 13.*
php: 8.2
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: mbstring
- name: Install dependencies
run: |
composer remove "phpro/grumphp" "larastan/larastan" --no-update --dev
composer require "laravel/framework:${{ matrix.laravel }}" --no-update --no-progress
composer update --${{ matrix.dependency-version }} --prefer-dist --no-progress
- name: Execute Unit Tests
run: composer test
================================================
FILE: .gitignore
================================================
/vendor
composer.phar
composer.lock
.DS_Store
/.idea
.phpunit.cache
.phpunit.result.cache
================================================
FILE: CHANGELOG.md
================================================
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
[3.0.0]
Version 3.x supports DomPDF version 3.x. See the changelog in https://github.com/dompdf/dompdf/releases/tag/v3.0.0
The most notable change in laravel-dompdf are the changed defaults, to be more secure;
- `enable_remote` is now `false` by default. Change with caution.
- `allowedRemoteHosts` and `artifactPathValidation` are added the the config.
Also, support for Laravel < 9 and PHP < 8.1 is dropped.
## [3.1]
This release updates the config for [dompdf/dompdf v3.1.0](https://github.com/dompdf/dompdf/releases/tag/v3.1.0) which contains the. following breaking URL:
> **Breaking Change**
> This release adds the "data://" scheme to the protocol validation rules. Installations that explicitly define the allowed protocols but do not include the "data://" protocol will no longer render data-URIs. This is a change from previous versions, where data-URIs were not processed through the validated rules. Installations that use the default validation rules included with Dompdf should see no impact.
The update for laravel-dompdf adds this to the default config, but if you have published the config, you need to add the `data://` scheme.
## [3.0]
Version 3.x supports DomPDF version 3.x. See the changelog in https://github.com/dompdf/dompdf/releases/tag/v3.0.0
The most notable change in laravel-dompdf are the changed defaults, to be more secure;
enable_remote is now false by default. Change with caution.
allowedRemoteHosts and artifactPathValidation are added the the config.
Also, support for Laravel < 9 and PHP < 8.1 is dropped.
## [2.2.0]
### What's Changed
* Fix setOptions by @cesarreyes3 in https://github.com/barryvdh/laravel-dompdf/pull/1040
* Bump dompdf minimum to 2.0.7 by @barryvdh
## New Contributors
* @cesarreyes3 made their first contribution in https://github.com/barryvdh/laravel-dompdf/pull/1040
**Full Changelog**: https://github.com/barryvdh/laravel-dompdf/compare/v2.1.1...v2.2.0
## [2.1.1]
### What's Changed
* Revert "Fix setOptions method" by @barryvdh in https://github.com/barryvdh/laravel-dompdf/pull/1039
**Full Changelog**: https://github.com/barryvdh/laravel-dompdf/compare/v2.1.0...v2.1.1
## [2.1.0]
### What's Changed
* Convert phpunit by @barryvdh in https://github.com/barryvdh/laravel-dompdf/pull/952
* ci: Use GitHub Actions V3 by @DannyvdSluijs in https://github.com/barryvdh/laravel-dompdf/pull/990
* Fix named arguments when using facade by @erikn69 in https://github.com/barryvdh/laravel-dompdf/pull/1002
* Update dompdf version as a dependancy by @AliSheikhDev in https://github.com/barryvdh/laravel-dompdf/pull/967
* ci: Use GitHub Actions V4 by @erikn69 in https://github.com/barryvdh/laravel-dompdf/pull/1003
* Fix phpstan analysis by @erikn69 in https://github.com/barryvdh/laravel-dompdf/pull/972
* Fix setOptions method by @erikn69 in https://github.com/barryvdh/laravel-dompdf/pull/974
* Small typo fix in dompdf config file by @ricklambrechts in https://github.com/barryvdh/laravel-dompdf/pull/1004
* Upgrade to larastan/larastan by @parth391 in https://github.com/barryvdh/laravel-dompdf/pull/1014
* Fixing "Upgrade to larastan/larastan" by @erikn69 in https://github.com/barryvdh/laravel-dompdf/pull/1018
* Laravel 11 Support by @erikn69 in https://github.com/barryvdh/laravel-dompdf/pull/1036
* Laravel 11.x Compatibility by @laravel-shift in https://github.com/barryvdh/laravel-dompdf/pull/1037
### New Contributors
* @DannyvdSluijs made their first contribution in https://github.com/barryvdh/laravel-dompdf/pull/990
* @AliSheikhDev made their first contribution in https://github.com/barryvdh/laravel-dompdf/pull/967
* @ricklambrechts made their first contribution in https://github.com/barryvdh/laravel-dompdf/pull/1004
* @parth391 made their first contribution in https://github.com/barryvdh/laravel-dompdf/pull/1014
* @laravel-shift made their first contribution in https://github.com/barryvdh/laravel-dompdf/pull/1037
**Full Changelog**: https://github.com/barryvdh/laravel-dompdf/compare/v2.0.1...v2.0.2
## [2.0.0]
Version 2 supports DomPDF 2.x
### Changed
- Remove the deprecated class 'Barryvdh\DomPDF\Facade' Facade in favor of Barryvdh\DomPDF\Facade\Pdf
- Set default Facade to Pdf instead of PDF
- HTML5 parser option is deprecated, because this is always on.
- `orientation` option was never used. Removed in favor of `options.default_paper_orientation`
### Added
- Upgraded to use dompdf/dompdf 2.x
- `setOption` to change only the specified option(s), instead of replace all options.
- Magic methods to allow calls to Dompdf methods easier. (#892)
- `default_paper_orientation` option has been added to the defaults.
- Add option to set public path (#890)
### Deprecated
- `setOptions` is now deprecated. Use `setOption` instead.
- Config `dompdf.defines` has been renamed to `dompdf.options`
## [2.0.0-beta3]
### Changed
- Remove the deprecated class 'Barryvdh\DomPDF\Facade' Facade in favor of Barryvdh\DomPDF\Facade\Pdf
- Set default Facade to Pdf instead of PDF
## [2.0.0-beta2]
### Added
- Upgraded to use dompdf/dompdf 2.x
- `setOption` to change only the specified option(s), instead of replace all options.
- Magic methods to allow calls to Dompdf methods easier. (#892)
- `default_paper_orientation` option has been added to the defaults.
- Add option to set public path (#890)
### Changed
- HTML5 parser option is deprecated, because this is always on.
- `orientation` option was never used. Removed in favor of `options.default_paper_orientation`
### Deprecated
- `setOptions` is now deprecated. Use `setOption` instead.
- Config `dompdf.defines` has been renamed to `dompdf.options`
## Dompdf 2.0.0, highlights since 1.2.x
> https://github.com/dompdf/dompdf/releases/tag/v2.0.0
> - Addresses multiple security vulnerabilities (see link)
> - Modifies callback and page_script/page_text handling (breaking change, see link)
> - Switches the HTML5 parser to Masterminds/HTML5
> - Improves CSS property parsing and representation
> - Improves border, outline, and background rendering for inline elements
> - Switches installed fonts and font metrics cache file format to JSON
> - Adds support for the inset CSS shorthand property and the legacy break-word keyword for word-break
> - Adds "end_document" callback event
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2021 barryvdh
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: composer.json
================================================
{
"name": "barryvdh/laravel-dompdf",
"description": "A DOMPDF Wrapper for Laravel",
"license": "MIT",
"keywords": [
"laravel",
"dompdf",
"pdf"
],
"authors": [
{
"name": "Barry vd. Heuvel",
"email": "barryvdh@gmail.com"
}
],
"require": {
"php": "^8.1",
"dompdf/dompdf": "^3.0",
"illuminate/support": "^9|^10|^11|^12|^13.0"
},
"require-dev": {
"orchestra/testbench": "^7|^8|^9.16|^10|^11.0",
"squizlabs/php_codesniffer": "^3.5",
"phpro/grumphp": "^2.5",
"larastan/larastan": "^2.7|^3.0"
},
"autoload": {
"psr-4": {
"Barryvdh\\DomPDF\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Barryvdh\\DomPDF\\Tests\\": "tests"
}
},
"extra": {
"branch-alias": {
"dev-master": "3.0-dev"
},
"laravel": {
"providers": [
"Barryvdh\\DomPDF\\ServiceProvider"
],
"aliases": {
"Pdf": "Barryvdh\\DomPDF\\Facade\\Pdf",
"PDF": "Barryvdh\\DomPDF\\Facade\\Pdf"
}
}
},
"scripts": {
"test": "phpunit",
"check-style": "phpcs -p --standard=psr12 src/",
"fix-style": "phpcbf -p --standard=psr12 src/",
"phpstan": "phpstan analyze --memory-limit=-1"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"allow-plugins": {
"phpro/grumphp": true
}
}
}
================================================
FILE: config/dompdf.php
================================================
false, // Throw an Exception on warnings from dompdf
'public_path' => null, // Override the public path if needed
/*
* Dejavu Sans font is missing glyphs for converted entities, turn it off if you need to show € and £.
*/
'convert_entities' => true,
'options' => [
/**
* The location of the DOMPDF font directory
*
* The location of the directory where DOMPDF will store fonts and font metrics
* Note: This directory must exist and be writable by the webserver process.
* *Please note the trailing slash.*
*
* Notes regarding fonts:
* Additional .afm font metrics can be added by executing load_font.php from command line.
*
* Only the original "Base 14 fonts" are present on all pdf viewers. Additional fonts must
* be embedded in the pdf file or the PDF may not display correctly. This can significantly
* increase file size unless font subsetting is enabled. Before embedding a font please
* review your rights under the font license.
*
* Any font specification in the source HTML is translated to the closest font available
* in the font directory.
*
* The pdf standard "Base 14 fonts" are:
* Courier, Courier-Bold, Courier-BoldOblique, Courier-Oblique,
* Helvetica, Helvetica-Bold, Helvetica-BoldOblique, Helvetica-Oblique,
* Times-Roman, Times-Bold, Times-BoldItalic, Times-Italic,
* Symbol, ZapfDingbats.
*/
'font_dir' => storage_path('fonts'), // advised by dompdf (https://github.com/dompdf/dompdf/pull/782)
/**
* The location of the DOMPDF font cache directory
*
* This directory contains the cached font metrics for the fonts used by DOMPDF.
* This directory can be the same as DOMPDF_FONT_DIR
*
* Note: This directory must exist and be writable by the webserver process.
*/
'font_cache' => storage_path('fonts'),
/**
* The location of a temporary directory.
*
* The directory specified must be writeable by the webserver process.
* The temporary directory is required to download remote images and when
* using the PDFLib back end.
*/
'temp_dir' => sys_get_temp_dir(),
/**
* ==== IMPORTANT ====
*
* dompdf's "chroot": Prevents dompdf from accessing system files or other
* files on the webserver. All local files opened by dompdf must be in a
* subdirectory of this directory. DO NOT set it to '/' since this could
* allow an attacker to use dompdf to read any files on the server. This
* should be an absolute path.
* This is only checked on command line call by dompdf.php, but not by
* direct class use like:
* $dompdf = new DOMPDF(); $dompdf->load_html($htmldata); $dompdf->render(); $pdfdata = $dompdf->output();
*/
'chroot' => realpath(base_path()),
/**
* Protocol whitelist
*
* Protocols and PHP wrappers allowed in URIs, and the validation rules
* that determine if a resouce may be loaded. Full support is not guaranteed
* for the protocols/wrappers specified
* by this array.
*
* @var array
*/
'allowed_protocols' => [
'data://' => ['rules' => []],
'file://' => ['rules' => []],
'http://' => ['rules' => []],
'https://' => ['rules' => []],
],
/**
* Operational artifact (log files, temporary files) path validation
*/
'artifactPathValidation' => null,
/**
* @var string
*/
'log_output_file' => null,
/**
* Whether to enable font subsetting or not.
*/
'enable_font_subsetting' => false,
/**
* The PDF rendering backend to use
*
* Valid settings are 'PDFLib', 'CPDF' (the bundled R&OS PDF class), 'GD' and
* 'auto'. 'auto' will look for PDFLib and use it if found, or if not it will
* fall back on CPDF. 'GD' renders PDFs to graphic files.
* {@link * Canvas_Factory} ultimately determines which rendering class to
* instantiate based on this setting.
*
* Both PDFLib & CPDF rendering backends provide sufficient rendering
* capabilities for dompdf, however additional features (e.g. object,
* image and font support, etc.) differ between backends. Please see
* {@link PDFLib_Adapter} for more information on the PDFLib backend
* and {@link CPDF_Adapter} and lib/class.pdf.php for more information
* on CPDF. Also see the documentation for each backend at the links
* below.
*
* The GD rendering backend is a little different than PDFLib and
* CPDF. Several features of CPDF and PDFLib are not supported or do
* not make any sense when creating image files. For example,
* multiple pages are not supported, nor are PDF 'objects'. Have a
* look at {@link GD_Adapter} for more information. GD support is
* experimental, so use it at your own risk.
*
* @link http://www.pdflib.com
* @link http://www.ros.co.nz/pdf
* @link http://www.php.net/image
*/
'pdf_backend' => 'CPDF',
/**
* html target media view which should be rendered into pdf.
* List of types and parsing rules for future extensions:
* http://www.w3.org/TR/REC-html40/types.html
* screen, tty, tv, projection, handheld, print, braille, aural, all
* Note: aural is deprecated in CSS 2.1 because it is replaced by speech in CSS 3.
* Note, even though the generated pdf file is intended for print output,
* the desired content might be different (e.g. screen or projection view of html file).
* Therefore allow specification of content here.
*/
'default_media_type' => 'screen',
/**
* The default paper size.
*
* North America standard is "letter"; other countries generally "a4"
*
* @see CPDF_Adapter::PAPER_SIZES for valid sizes ('letter', 'legal', 'A4', etc.)
*/
'default_paper_size' => 'a4',
/**
* The default paper orientation.
*
* The orientation of the page (portrait or landscape).
*
* @var string
*/
'default_paper_orientation' => 'portrait',
/**
* The default font family
*
* Used if no suitable fonts can be found. This must exist in the font folder.
*
* @var string
*/
'default_font' => 'serif',
/**
* Image DPI setting
*
* This setting determines the default DPI setting for images and fonts. The
* DPI may be overridden for inline images by explictly setting the
* image's width & height style attributes (i.e. if the image's native
* width is 600 pixels and you specify the image's width as 72 points,
* the image will have a DPI of 600 in the rendered PDF. The DPI of
* background images can not be overridden and is controlled entirely
* via this parameter.
*
* For the purposes of DOMPDF, pixels per inch (PPI) = dots per inch (DPI).
* If a size in html is given as px (or without unit as image size),
* this tells the corresponding size in pt.
* This adjusts the relative sizes to be similar to the rendering of the
* html page in a reference browser.
*
* In pdf, always 1 pt = 1/72 inch
*
* Rendering resolution of various browsers in px per inch:
* Windows Firefox and Internet Explorer:
* SystemControl->Display properties->FontResolution: Default:96, largefonts:120, custom:?
* Linux Firefox:
* about:config *resolution: Default:96
* (xorg screen dimension in mm and Desktop font dpi settings are ignored)
*
* Take care about extra font/image zoom factor of browser.
*
* In images, size in pixel attribute, img css style, are overriding
* the real image dimension in px for rendering.
*
* @var int
*/
'dpi' => 96,
/**
* Enable embedded PHP
*
* If this setting is set to true then DOMPDF will automatically evaluate embedded PHP contained
* within tags.
*
* ==== IMPORTANT ==== Enabling this for documents you do not trust (e.g. arbitrary remote html pages)
* is a security risk.
* Embedded scripts are run with the same level of system access available to dompdf.
* Set this option to false (recommended) if you wish to process untrusted documents.
* This setting may increase the risk of system exploit.
* Do not change this settings without understanding the consequences.
* Additional documentation is available on the dompdf wiki at:
* https://github.com/dompdf/dompdf/wiki
*
* @var bool
*/
'enable_php' => false,
/**
* Enable inline JavaScript
*
* If this setting is set to true then DOMPDF will automatically insert JavaScript code contained
* within tags as written into the PDF.
* NOTE: This is PDF-based JavaScript to be executed by the PDF viewer,
* not browser-based JavaScript executed by Dompdf.
*
* @var bool
*/
'enable_javascript' => true,
/**
* Enable remote file access
*
* If this setting is set to true, DOMPDF will access remote sites for
* images and CSS files as required.
*
* ==== IMPORTANT ====
* This can be a security risk, in particular in combination with isPhpEnabled and
* allowing remote html code to be passed to $dompdf = new DOMPDF(); $dompdf->load_html(...);
* This allows anonymous users to download legally doubtful internet content which on
* tracing back appears to being downloaded by your server, or allows malicious php code
* in remote html pages to be executed by your server with your account privileges.
*
* This setting may increase the risk of system exploit. Do not change
* this settings without understanding the consequences. Additional
* documentation is available on the dompdf wiki at:
* https://github.com/dompdf/dompdf/wiki
*
* @var bool
*/
'enable_remote' => false,
/**
* List of allowed remote hosts
*
* Each value of the array must be a valid hostname.
*
* This will be used to filter which resources can be loaded in combination with
* isRemoteEnabled. If enable_remote is FALSE, then this will have no effect.
*
* Leave to NULL to allow any remote host.
*
* @var array|null
*/
'allowed_remote_hosts' => null,
/**
* A ratio applied to the fonts height to be more like browsers' line height
*/
'font_height_ratio' => 1.1,
/**
* Use the HTML5 Lib parser
*
* @deprecated This feature is now always on in dompdf 2.x
*
* @var bool
*/
'enable_html5_parser' => true,
],
];
================================================
FILE: grumphp.yml
================================================
grumphp:
tasks:
phpunit:
config_file: ~
testsuite: ~
group: []
always_execute: false
phpcs:
standard: PSR12
warning_severity: ~
ignore_patterns:
- tests/
triggered_by: [php]
phpstan:
autoload_file: ~
configuration: ~
level: null
force_patterns: [ ]
ignore_patterns: [ ]
triggered_by: [ 'php' ]
memory_limit: "-1"
use_grumphp_paths: true
================================================
FILE: phpstan.neon
================================================
includes:
- vendor/larastan/larastan/extension.neon
parameters:
reportUnmatchedIgnoredErrors: false
paths:
- src
- tests
level: 8
ignoreErrors:
# This is a global alias that cannot be detected by Larastan.
- '#Call to static method loadHTML\(\) on an unknown class PDF\.#'
- '#Call to static method loadHTML\(\) on an unknown class Pdf\.#'
================================================
FILE: phpunit.xml.dist
================================================