Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 17, 2024 via composer

phenx/php-svg-lib 0.5.1

A library to read, parse and export to PDF SVG files.
Package summary
Share
6
issues
2
critical severity
vulnerability
2
3
moderate severity
vulnerability
2
license
1
1
low severity
license
1
2
licenses
1
LGPL-3.0
1
MIT
Package created
3 May 2015
Version published
11 Dec 2023
Maintainers
3
Total deps
2
Direct deps
1
License
LGPL-3.0

Issues

6

3 moderate severity issues

moderate
via: phenx/php-svg-lib@0.5.1
via: phenx/php-svg-lib@0.5.1
Recommendation: Validate that the package complies with your license policy
via: phenx/php-svg-lib@0.5.1
Collapse
Expand

1 low severity issue

low
via: phenx/php-svg-lib@0.5.1
Collapse
Expand

Licenses

GNU Lesser General Public License v3.0 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
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.1

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
1 Packages, Including:
sabberworm/php-css-parser@v8.5.1
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

1
All Dependencies CSV
β“˜ This is a list of phenx/php-svg-lib 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
sabberworm/php-css-parserv8.5.1-MIT
prod

Visualizations

Frequently Asked Questions

What does phenx/php-svg-lib do?

The phenx/php-svg-lib is a versatile library designed to handle Scalable Vector Graphics (SVG) files within PHP. Its main function serves to read, parse, and export SVGs into Portable Document Format (PDF) effectively. This library essentially rasterizes SVG into a surface that could be an image or more commonly a PDF, through the \Svg\Surface PHP interface. The inception of this project was primarily to render SVG documents embedded within PDF files for the DomPdf project, highlighting its importance in manipulating SVG files for dynamic web applications.

How do you use phenx/php-svg-lib?

To integrate the phenx/php-svg-lib into your projects, you would first need to install it using Composer, a dependency manager for PHP. Please make sure that you have Composer installed on your machine. Run the command below to include the library in your project:

composer require phenx/php-svg-lib

Once it's installed, you can use the \Svg\Surface PHP interface provided by the library for SVG rasterization.

Here is a basic usage example:

use Svg\Surface;

// create a surface instance
$surface = new Surface();

// load SVG file
$svg = file_get_contents('path_to_your_svg_file.svg');

// parse and rasterize SVG file
$surface->parse($svg);

// export SVG to PDF
$surface->export('path_to_output_pdf_file.pdf');

Remember to replace path_to_your_svg_file.svg with the path to the actual SVG file you want to parse, and path_to_output_pdf_file.pdf with the output path where the PDF file will be created.

Where are the phenx/php-svg-lib docs?

Unfortunately, based on the given GitHub repository, it seems that the documents for phenx/php-svg-lib package aren't explicitly provided. However, users can utilize the source code, specifically the \Svg\Surface PHP interface for learning purposes. Additionally, you can check the GitHub repository's issue tracker for any potential queries or issues experienced by other users and their resolutions. The usage example provided can serve as a starting point to familiarize yourself with the package. As always, for open-source projects, please feel free to contribute to the documentation if you can!