https://github.com/vaibhavpandeyvpz/php-rsvg
PHP extension based on RSVG library to quickly convert SVG files into EPS, PDF, PNG and SVG again.
https://github.com/vaibhavpandeyvpz/php-rsvg
c cairo pdf php phpize png rsvg
Last synced: about 1 year ago
JSON representation
PHP extension based on RSVG library to quickly convert SVG files into EPS, PDF, PNG and SVG again.
- Host: GitHub
- URL: https://github.com/vaibhavpandeyvpz/php-rsvg
- Owner: vaibhavpandeyvpz
- Created: 2024-05-04T07:44:43.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-06T12:52:57.000Z (about 2 years ago)
- Last Synced: 2025-04-24T06:18:54.441Z (about 1 year ago)
- Topics: c, cairo, pdf, php, phpize, png, rsvg
- Language: PHP
- Homepage: https://vaibhavpandey.com/
- Size: 27.3 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# php-rsvg
[PHP](https://www.php.net/) extension based on [RSVG](https://gitlab.gnome.org/GNOME/librsvg) library to quickly convert SVG files into EPS, PDF, PNG and SVG again.
## Requirements
* [PHP](https://www.php.net/) 7.x or 8.x
* [cairo](https://www.cairographics.org/) (tested with 1.18.0)
* [librsvg](https://gitlab.gnome.org/GNOME/librsvg) (tested with 2.58.0)
## Installation
To build and install the module, clone the project and run below command:
```shell
phpize
./configure
make
make install
```
Then enable the extension in your `php.ini`
```shell
extension=rsvg.so
```
To try out the extension, you can run the following command
```shell
php -a -d extension=modules/rsvg.so
```
## Usage
Once loaded, you can use below functions to process SVG files:
```php