Portable library to render 2D structural formulas as vector graphics from SMILES or InChI
You might want to have a look at Open Babel.


It is licensed under GNU GPLv2  
It has bindings for Python
It has bindings for PHP
It has bindings for Ruby
It can read (and write) SMILES
It can read (and write) InChI
It   can write SVG
It can write a list of painter commands