Creating Vector Graphics with PHP

jef2904 picture jef2904 · Jan 6, 2011 · Viewed 15.7k times · Source

Im trying to create vector graphics in PHP. Ive tried Cairo and I havn't been able to get it to work. I understand that imageMagick has vector functionality but the documentation on php.net is very poor can some one lead me in the right direction? The ideas is to be able to save the graphic to EPS. I also need to be able to use different fonts to output text.

Answer

33v picture 33v · Jun 16, 2011

Although you're looking to create eps I would still aim to create a PDF. PDF's are fully editable in any major package: Adobe Illustrator, Corel Draw, Xara Pro etc

TCPDF works well and there is a bunch of code samples including fonts and support for vector images eps and ai output to PDF

eps/ai example http://www.tcpdf.org/examples/example_032.pdf

All the examples and php code http://www.tcpdf.org/examples.php