Download the PHP package msztorc/svg-convert without Composer

On this page you can find all versions of the php package msztorc/svg-convert. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package svg-convert

Build Status License

svg-convert

svg-convert

Various helpers to convert SVG files to other formats, especially PNG and PDF. Package includes CLI (phantomjs script) to render and php adapter to manipulate and convert SVG format using phantomjs or rsvg-convert (librsvg).

Install PhantomJS

Before installing PhantomJS, you will need to install some required packages on your system. You can install all of them with the following commands:

sudo apt-get update

sudo apt-get install build-essential chrpath libssl-dev libxft-dev libfreetype6-dev libfreetype6 libfontconfig1-dev libfontconfig1 -y

Next, you will need to download the PhantomJS. You can download the latest stable version of the PhantomJS from their official website.

wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2

Extract the downloaded archive file to desired system location:

sudo tar xvjf phantomjs-2.1.1-linux-x86_64.tar.bz2 -C /usr/local/share/

Next, create a symlink of PhantomJS binary file to systems bin directory:

sudo ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/

Use psvg-convert script globally

Install RSVG (only if you want to convert svg using librsvg)

sudo apt-get update

sudo apt-get install libcairo2-dev libspectre-dev librsvg2-dev \ libpoppler-glib-dev librsvg2-bin

Examples

Convert SVG to PNG format using PhantomJS CLI script

psvg-convert inputfile.svg outputfile.png

Usage

psvg-convert svgfile outputfile [--width=800 --height=600 --zoom=2.5 --format=png|pdf]

Convert SVG file in PHP

Initializing method with phantomjs argument when you want use to PhantomJS engine

or if you want to use rsvg-convert

Manipulate and convert SVG file in PHP

Other useful methods

Open file

Set zoom

Set size

Set output format

Display file

Download file

Save file

Image tests

All images you can find in unit tests folder.

PhantomJS rsvg-convert

SVG manipulation

Create gif using imagemagick

convert -loop 0 -delay 25 ubuntu1.png ubuntu2.png ubuntu3.png ubuntu.gif

License

MIT


All versions of svg-convert with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package msztorc/svg-convert contains the following files

Loading the files please wait ....