Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 27, 2024 via composer

dompdf/dompdf v2.0.4

DOMPDF is a CSS 2.1 compliant HTML to PDF converter
Package summary
Share
4
issues
3
moderate severity
license
3
1
low severity
license
1
4
licenses
2
MIT
1
LGPL-2.1
1
LGPL-2.1-or-later
1
LGPL-3.0-or-later
Package created
15 Nov 2012
Version published
12 Dec 2023
Maintainers
3
Total deps
5
Direct deps
3
License
LGPL-2.1

Issues

4

3 moderate severity issues

moderate
Recommendation: Validate that the package complies with your license policy
via: dompdf/dompdf@v2.0.4
Recommendation: Validate that the package complies with your license policy
via: phenx/php-font-lib@0.5.6
Recommendation: Validate that the package complies with your license policy
via: phenx/php-svg-lib@0.5.4
Collapse
Expand

1 low severity issue

low
via: dompdf/dompdf@v2.0.4
Collapse
Expand

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
masterminds/html5@2.9.0
sabberworm/php-css-parser@v8.5.1

GNU Lesser General Public License v2.1 only

Weakly Protective
OSI Approved
Deprecated
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
sublicense
Must
include-original
include-copyright
include-license
disclose-source
state-changes
include-notice
1 Packages, Including:
dompdf/dompdf@v2.0.4

GNU Lesser General Public License v2.1 or later

Weakly Protective
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
Cannot
Must
1 Packages, Including:
phenx/php-font-lib@0.5.6

GNU Lesser General Public License v3.0 or later

Weakly Protective
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
use-patent-claims
Cannot
sublicense
hold-liable
Must
include-original
state-changes
disclose-source
include-license
include-copyright
include-install-instructions
1 Packages, Including:
phenx/php-svg-lib@0.5.4
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

3
All Dependencies CSV
β“˜ This is a list of dompdf/dompdf 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
masterminds/html52.9.0-MIT
prod
phenx/php-font-lib0.5.6-LGPL-2.1-or-later
prod
1
phenx/php-svg-lib0.5.4-LGPL-3.0-or-later
prod
1

Visualizations

Frequently Asked Questions

What does dompdf/dompdf do?

Dompdf is a powerful tool that operates as an HTML to PDF converter. At its core, it's a style-driven rendering engine, capable of interpreting and implementing CSS 2.1. Not only does it support most presentational HTML attributes, but it also reads external stylesheets, inline style tags, and CSS rules for individual HTML elements. Its exceptional functionality, written in PHP, allows for a wide array of CSS 2.1 properties, including @import, @media, and @page rules.

How do you use dompdf/dompdf?

You can utilize Dompdf in just a few easy steps. Start by installing it with Composer using the command composer require dompdf/dompdf. Then, you'll have to load the Composer autoload file in your project.

require 'vendor/autoload.php';

The core Dompdf class can be utilized to convert your HTML content into a PDF.

use Dompdf\Dompdf;

$dompdf = new Dompdf();
$dompdf->loadHtml('hello world');
$dompdf->setPaper('A4', 'landscape');
$dompdf->render();
$dompdf->stream();

Also, you can set options either during Dompdf instantiation or at run time.

use Dompdf\Dompdf;
use Dompdf\Options;

$options = new Options();
$options->set('defaultFont', 'Courier');
$dompdf = new Dompdf($options);

These steps should assist you in exploiting Dompdf's powerful functionality to generate PDFs from HTML content.

Where are the dompdf/dompdf docs?

You can find the comprehensive documentation for Dompdf here. In addition to explaining various features and functions of the package, it also offers insight on requirements, recommendations, and known limitations. It contains all the necessary information to use, troubleshoot, and understand the workings of the Dompdf package, making it helpful for all users, including newcomers and experienced developers.