PHPackages                             opnmind/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. opnmind/php-svg

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

opnmind/php-svg
===============

Generate SVG files with PHP

v0.5.0(9y ago)02712MITPHPPHP &gt;=5.3.3

Since Sep 19Pushed 9y agoCompare

[ Source](https://github.com/opnmind/php-svg)[ Packagist](https://packagist.org/packages/opnmind/php-svg)[ Docs](https://github.com/JangoBrick/php-svg)[ RSS](/packages/opnmind-php-svg/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (6)Used By (0)

php-svg
=======

[](#php-svg)

[![Build Status](https://camo.githubusercontent.com/85c453884aaff1a0e6be92316c3c47f5377db81c32aa2b7136226b3a592348e5/68747470733a2f2f7472617669732d63692e6f72672f6f706e6d696e642f7068702d7376672e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/opnmind/php-svg)[![Code Climate](https://camo.githubusercontent.com/11c021a96968e97bafe725b4fe9377a3dac3f1a0932bf2f149f97bd296333214/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6f706e6d696e642f7068702d7376672f6261646765732f6770612e737667)](https://codeclimate.com/github/opnmind/php-svg)

This project is forked from [JangoBrick/php-svg](https://github.com/JangoBrick/php-svg) an will be randomly extended with feature I need for my work.

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 opnmind/php-svg

```

### Manual

[](#manual)

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

```
