0

I want to use inkscape as service on apache server. I mean i will send request to server via php/ajax/socket and some parameters to inkscape(installed on apache) and it will give output as jpg/png image..

Is It Possible through some macro like functionality. where i will provide service to user that it will change parameters through website and quickly preview changes done :)

i have tried svg edit but it cant be installed on server and not providing robust functionalities as inkscape

i have got some code following

mkdir -p /var/www/.gnome2 /var/www/.config /var/www/.config/inkscape
chmod 755 /var/www/.gnome2 /var/www/.config /var/www/.config/inkscape
chown -R www-data /var/www/.gnome2 /var/www/.config /var/www/.config/inkscape

but dont know how to use

anshuVersatile
  • 398
  • 2
  • 13
  • The code you have only creates a folder and assigns it to a certain user. What exactly is the problem? – aurbano Mar 28 '14 at 08:15
  • i want to place inkscape on server(apache) and call it from php.. and i dont know anything.... now i am using corelDraw installed on windows server and communicating with that server through php sockets... i just want to know that how to install inkscape on apache and communicate with it through console.. – anshuVersatile Mar 28 '14 at 12:11
  • You install inkscape on the server where Apache is, and then you use php's `exec()` to communicate with it. I don't know how the inkscape command line utility works though. – aurbano Mar 28 '14 at 12:26

1 Answers1

1

This shouldn't be hard.

  1. You need to set up a Web API. You can use PHP, C#, Java anything you want. Expose an end point to users and allow them to configure some parameter if they need to.
  2. When the end point is called start a process which uses command line utilities of inkscape. Refer to this for inkscape command line options: https://inkscape.org/sk/doc/inkscape-man.html Refer to this for starting a process using PHP: php execute a background process

Basically write the output of inkscape to a file on disk. Read it back from PHP and delete the file. You can send the response back to user from PHP.

The only dependency is you need to install Inkscape on the server. If you are using a shared hosting space they won't allow you to do that, if you have your own web server you can do that very easily.

Mit Suthar
  • 69
  • 1
  • 2