PHPackages                             mediashowroom/php-svg - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mediashowroom/php-svg

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mediashowroom/php-svg
=====================

Read, edit, write, and render SVG files with PHP

v0.7.0(8y ago)010.7kMITPHPPHP &gt;=5.3.3

Since Sep 19Pushed 8y ago1 watchersCompare

[ Source](https://github.com/mediashowroom/php-svg)[ Packagist](https://packagist.org/packages/mediashowroom/php-svg)[ Docs](https://github.com/mediashowroom/php-svg)[ RSS](/packages/mediashowroom-php-svg/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (15)Used By (0)

php-svg
=======

[](#php-svg)

[![Build Status](https://camo.githubusercontent.com/7293f1ed9aca68f047f9eb7187bacb360c4a64846f490a565c31c6677044470f/68747470733a2f2f7472617669732d63692e6f72672f6d657966612f7068702d7376672e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/meyfa/php-svg)[![Code Climate](https://camo.githubusercontent.com/3b31ddf459ce91c403df64634282fd7cb2c204f2fd69223b21d0034504bc31a5/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6d657966612f7068702d7376672f6261646765732f6770612e737667)](https://codeclimate.com/github/meyfa/php-svg)

This is a vector graphics library for PHP, which surely is a broad specification. That is due to the fact that the goal of this project is to offer features in three different, big areas:

- Generating SVG images from PHP code and outputting them, either into XML strings or into files.
- Loading and parsing XML strings into document trees that can be easily modified and then also turned back into strings.
- Transforming parsed or generated document trees into raster graphics, like PNG.

Contributing
------------

[](#contributing)

These tasks will take a lot of time and effort, so you are welcome to contribute if this is a project you are interested in.
In case you decide to contribute, please honor these things:

1. External libraries shall not be used.
2. Please set your editor to use 4 spaces for indentation. In general, it would be good to follow the existing code style for consistency.
3. Source files must end with a newline character.
4. By contributing code, you agree to license that code under the MIT license to this project.

---

Installation
------------

[](#installation)

### Composer (recommended)

[](#composer-recommended)

This package is available through Composer/Packagist:

```
$ composer require meyfa/php-svg

```

### Manual

[](#manual)

[Download](https://github.com/meyfa/php-svg/zipball/master) this repo, or the [latest release](https://github.com/meyfa/php-svg/releases), and put it somewhere in your project. Then do:

```
