Re: [Rdkit-discuss] svg export from rdkit messed up in Adobe Illustrator , but not in firefox / chrome: fixes?

2011-01-14 Thread hari jayaram
I just re-tried the rdkit generated svg files in Adobe Illustrator CS5 and
it works just fine. So whatever oddity there was in Adobe Illustrators
handling of rdkit (and cairo) generated svg  seems to be fixed.
I am using the svn build of rdkit on Leopard OSX. svn release 1632

Thought I would post it to this thread for completeness sake


Hari


On Mon, Sep 27, 2010 at 10:25 AM, hari jayaram hari...@gmail.com wrote:

 I tied the hack , i.e scaling all the glyphs down. The scaled down glyphs -
 appear scaled down in Inkscape and other svg viewers.
 The adobe Illustrator glyph is still humongous and enlarged

 I filed a bug report at Adobe Illustrator forums and the bug report section
 saying svg support seems broken. For now I am editing the structures as ps
 objects which rdkit outputs.

 Thanks to your suggestion I now know what the glyphs are and a little more
 about svg.

 Hari


 On Fri, Sep 24, 2010 at 9:17 AM, Paul Emsley 
 paul.ems...@bioch.ox.ac.ukwrote:


 As a hack, I suppose that you could add

 transform=scale(0.2) (or some such) to the attributes of the paths for
 the glyph symbols.

 i.e.

 replace

 path style=stroke:none; d=M 0.5 1.765625 L 0.5 -7.046875 L 5.5
 -7.046875 L 5.5 1.765625 L 0.5 1.765625 Z M 1.0625 1.21875 L 4.9375
 1.21875 L 4.9375 -6.484375 L 1.0625 -6.484375 L 1.0625 1.21875 Z M
 1.0625 1.21875 /

 with

 path transform=scale(0.2) style=stroke:none; d=M 0.5 1.765625 L
 0.5 -7.046875 L 5.5 -7.046875 L 5.5 1.765625 L 0.5 1.765625 Z M 1.0625
 1.21875 L 4.9375 1.21875 L 4.9375 -6.484375 L 1.0625 -6.484375 L 1.0625
 1.21875 Z M 1.0625 1.21875 /

 and do that for each of the glyphs.

 Paul.



 --
 Nokia and ATT present the 2010 Calling All Innovators-North America
 contest
 Create new apps  games for the Nokia N8 for consumers in  U.S. and Canada
 $10 million total in prizes - $4M cash, 500 devices, nearly $6M in
 marketing
 Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
 http://p.sf.net/sfu/nokia-dev2dev
 ___
 Rdkit-discuss mailing list
 Rdkit-discuss@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/rdkit-discuss



--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] svg export from rdkit messed up in Adobe Illustrator , but not in firefox / chrome: fixes?

2010-09-27 Thread hari jayaram
I tied the hack , i.e scaling all the glyphs down. The scaled down glyphs -
appear scaled down in Inkscape and other svg viewers.
The adobe Illustrator glyph is still humongous and enlarged

I filed a bug report at Adobe Illustrator forums and the bug report section
saying svg support seems broken. For now I am editing the structures as ps
objects which rdkit outputs.

Thanks to your suggestion I now know what the glyphs are and a little more
about svg.

Hari


On Fri, Sep 24, 2010 at 9:17 AM, Paul Emsley paul.ems...@bioch.ox.ac.ukwrote:


 As a hack, I suppose that you could add

 transform=scale(0.2) (or some such) to the attributes of the paths for
 the glyph symbols.

 i.e.

 replace

 path style=stroke:none; d=M 0.5 1.765625 L 0.5 -7.046875 L 5.5
 -7.046875 L 5.5 1.765625 L 0.5 1.765625 Z M 1.0625 1.21875 L 4.9375
 1.21875 L 4.9375 -6.484375 L 1.0625 -6.484375 L 1.0625 1.21875 Z M
 1.0625 1.21875 /

 with

 path transform=scale(0.2) style=stroke:none; d=M 0.5 1.765625 L
 0.5 -7.046875 L 5.5 -7.046875 L 5.5 1.765625 L 0.5 1.765625 Z M 1.0625
 1.21875 L 4.9375 1.21875 L 4.9375 -6.484375 L 1.0625 -6.484375 L 1.0625
 1.21875 Z M 1.0625 1.21875 /

 and do that for each of the glyphs.

 Paul.



 --
 Nokia and ATT present the 2010 Calling All Innovators-North America
 contest
 Create new apps  games for the Nokia N8 for consumers in  U.S. and Canada
 $10 million total in prizes - $4M cash, 500 devices, nearly $6M in
 marketing
 Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
 http://p.sf.net/sfu/nokia-dev2dev
 ___
 Rdkit-discuss mailing list
 Rdkit-discuss@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] svg export from rdkit messed up in Adobe Illustrator , but not in firefox / chrome: fixes?

2010-09-24 Thread Paul Emsley

As a hack, I suppose that you could add

transform=scale(0.2) (or some such) to the attributes of the paths for 
the glyph symbols.

i.e.

replace

path style=stroke:none; d=M 0.5 1.765625 L 0.5 -7.046875 L 5.5 
-7.046875 L 5.5 1.765625 L 0.5 1.765625 Z M 1.0625 1.21875 L 4.9375 
1.21875 L 4.9375 -6.484375 L 1.0625 -6.484375 L 1.0625 1.21875 Z M 
1.0625 1.21875 /

with

path transform=scale(0.2) style=stroke:none; d=M 0.5 1.765625 L 
0.5 -7.046875 L 5.5 -7.046875 L 5.5 1.765625 L 0.5 1.765625 Z M 1.0625 
1.21875 L 4.9375 1.21875 L 4.9375 -6.484375 L 1.0625 -6.484375 L 1.0625 
1.21875 Z M 1.0625 1.21875 /

and do that for each of the glyphs.

Paul.


--
Nokia and ATT present the 2010 Calling All Innovators-North America contest
Create new apps  games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] svg export from rdkit messed up in Adobe Illustrator , but not in firefox / chrome: fixes?

2010-09-23 Thread hari jayaram
Hi Greg and everyone ,

I do have cairo installed

import cairo

Works fine

To generate the svg , I am using the MolToFile method from Chem.Draw


from rdkit.Chem.Draw import MolToFile

self.rdkitmolecule = rdkit.Chem.MolFromSmiles(self.smiles_string)

def make_svg_file(self):
return MolToFile(self.rdkitmolecule,%s.svg % self.compound_id)

I think its Adobe Illustrator CS3 thats screwing up, since the svg
works just fine in Inkscape, Chrome browser and Firefox and also
validates with the w3c svg validator.
I was just hoping there is a way to tweak the file to have it not blow
up my font characters in Adobe Illustrator.  Its sad that a commercial
solution like Illustrator does not support true SVG.
screenshot attached:
Thanks
Hari
Hari




On Thu, Sep 23, 2010 at 2:08 AM, Greg Landrum greg.land...@gmail.com wrote:
 Dear Hari,

 On Wed, Sep 22, 2010 at 9:23 PM, hari jayaram hari...@gmail.com wrote:

 Adobe illustrator reads in the SVG , however the atom alphabets are a
 few inches across  despite  the bonds showing  up normally. Adobe
 Illustrator draws the Oxygen, Nitrogen and Carbon atoms are in
 font-size 60 or 80 and positioned at a random point above the
 molecule.
 The svg does validate with the w3c validator  and is openable with
 Chrome and Firefox without any distortion ,so it seems that Adobe
 Illustrator is screwing up.

 Does anyone know how to correct the SVG file to not have this happen.
 I apologize that this is not strictly a rdkit question , but just
 asking in case others have successfully used the rdkit generated svg
 in a vector drawing program.

 I'd like to know if the SVG in question is from my code or from cairo,
 can you please let me know if you have cairo installed (to check start
 python and type import cairo) and, if so, what you did to generate
 the SVG?

 Best,
 -greg

attachment: screenshot_svg_mol_in_adobe_illustrator.PNG--
Nokia and ATT present the 2010 Calling All Innovators-North America contest
Create new apps  games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss