SVG export _1_

Hi,
I have troubles when exporting SVG -file from Illustrator (CS3 or CS4, mac version).
Illustrator creates weird _1_, _2_ and endings to the layers, groups or items.
Like this way:
In Illustrator, I create group which name is "SB-test" (this group contains several paths).
I export SVG -file (1.1).
...then, I look that SVG -file in with text editor, Inkscape etc. application...and the "SB-test" -group ID is named as SB-test_1_
Why -and how to avoid that?
Thanks for advance!

I know this post is fairly old, but I stumbled across the same problem with group names when converting to SVG. I created a workaround that is included in a script that is called when the SVG is loaded:
Loop through the SVG and find each group and get the name.
var svgdoc = document.embeds(0).getSVGDocument();
var groupList = svgdoc.getElementsByTagName("g");
     for(j = 0; j < groupList.length; j ++) {
       var child = groupList.item(j).getElementsByTagName("g");
       var GroupName = groupList.item(j).getAttribute("id");
Get the length of the group name and determine if the end character of the name is "_".
    var newGroupNameLength = newGroupName.length;
    var childLastChar = newGroupName.substring(newGroupNameLength-1,newGroupNameLength);
If the last character is "_", change the group name to ignore the last three characters.
    if (childLastChar == "_")  {
      newGroupName = newGroupName.substring(0,newGroupNameLength-3);
set the group ID to the new group name.
    groupList.item(j).setAttribute("id",newGroupName);
Hope that helps. I use the same kind of method to correct the beginning of group names where Illustrator replaces illegal SVG starting characters such as '0' and '#' with "_x30_" and "_x23_", respectively.

Similar Messages

  • Variable color in SVG export

    Hello,
    we are in the process of designing a website for one of our customer, with the goal of making them self-sufficient in feeding the site with new products.
    One of the feature requires producing custom SVG files which are then rendered to PNG (when the browser doesn't support it correctly, that is most of them including Firefox which doesn't like gradients yet), and the possibility of updating several of the item colors on the fly.
    This requires identifying in the source file which colors must be flagged as say, "variablecolor1", "variablecolor2" and so on, with XML entities or some other means.
    Think about online visualization of t-shirt color changes.
    It's not actually scripting-specific, but nor windows or mac, and maybe there is a scripting solution to it.
    Since our customer is using Illustrator to generate their catalog, we wanted to integrate as much as possible with their workflow. AI seems to generate usable SVG files, however, we would like to avoid having to write an error-prone post-processing engine (likely in php) the designer will have to run to assertain which color entries in the files are the one we want to modify. Note possibly another part of the drawing with the same color might not be part of what to change...
    A possible option would be creating the SVG with a predefined color, like #0000fe for variablecolor1 or whichever, but they want to have it look with the chosen default colors when not yet changed. Having them produce two versions (one with correct colors and one with hardcoded values for us) seems error prone.
    The other option, as said is to run the SVG code through some magic identifying the color values, list them and allow checking which are to change. However this is also possibly error prone.
    With a co-worker we checked AI for quite some hours without much luck trying to find something that would allow us to directly flag those colors. The online manual had topics with interesting names but the descriptions weren't really helpful, so we had to test on his machine.
    We found about variables in AI, but sadly it seems this doesn't concern colors at all. Text, data and some other things but no color.
    Some other palette-swapping functions didn't seem to pass anything when exporting to SVG.
    Also, we checked the various option in the SVG export dialog, one exports XML entities, which would seem interesting if it didn't export the whole style of the object, besides it doesn't concern gradients which stay with their hardcoded colors on the gradient stops in the XML code.
    I find it odd that no such feature exists to allow variable or named colors in drawing...
    Does anyone know about such feature, or think it's possible to script something to easily flag the current object in such a way the SVG export would retain this information ?

    Oh, BTW, it technically is not a white background either. It is a transparent background. But the grid is hidden to make it easier to design. For new users this can be deceiving since almost any other app is a white background unless you see the grid like in photoshop. In Illustrator, to fill you are required to have an object.

  • Help with SVG Export

    Hey all,
    I am building a glyph font in Illustrator CS6. The problem here deals with a large number of assets, all of which need SVG exports at 32x32px (due to a strict grid definitions) for import and compiling purposes (assets need to be sequential in naming for accurate import and compile and maintenance as well). All of the AI export solutions I have seen require the SVGs to be on individual artboards or in separate layers in order to export.
    Artboards are extremely limiting as AI has that infamous 100 artboard limit.
    When it comes to the layers solution, as far as I can tell, there is no way via extensions or otherwise to take sublayers (grouped/compound paths intact; release to layers does not retain the compound paths) and turn them into top-level layers which can then, in turn, be exported as individual SVG's via this script modified by Tom Byrne.
    At this point it seems like an entirely manual process. Does anyone have any ideas or suggestions? Am I missing something that could ease the production pain?
    Regards,
    Sean

    You might want to look at Inkscape which is a freeware product and I believe that the output is SVG.

  • SVG export to Illustrator?!?!

    Okay okay... is it just me or is it stupid not to have SVG export to open into Illustrator but not KEEP the new Weight tool's weights when exporting to Illustrator which by Adobe's OWN admission is the same EAXACT tool!?!?! Is it just me? REALLY!?!?!
    Am I just doing it wrong? Is this possible or not? So much for a 'suite'.

    Semi-ignore my previous answer - figured out another work around that involves converting your slices to artboards.
    After you have made all of your slices, use the Slice Selection Tool to select your first slice. Go to Object > Artboards > Convert to Artboards. This should create a new artboard out of that slice. Do this for all of your slices.
    After creating new artboards from your slices, go to File > Export... and select Flash (swf) from the dropdown menu. Make sure you check the "Use Artboards" option underneath the format menu.
    This process should result in individual swf files of each of your slices, along with your original image. Hope this helps!

  • SVG export fails

    Hi all,
    We work on an AI file that functions as a master file for a icon library. The file is composed of several (roughly A4 sized) artboard that provide structure for the content. Each artboard contains a number of icons. In total there are about 200 icons.
    We use 'Save for Web and Devices' for exporting the icons into SVG files. Our script transforms an alignment box (drawn under the actual icon shape) into a small artboard (typical size is 23x20 px) that is then exported into a SVG file. Intially this solution worked fine.
    However, now as the number of items increase in the file (the file size is currently about 30MB) the SVG export started to fail. We get an error message saying: "failed to perform the operation, not enough memory". It seems that the size of the overall file has a factor even when we export only a tiny part of it. Deleting some drawings from the file cures the problem. Is this a bug? What can we do about it other than split the file?
          .mika.

    AI still parses all objects and that's what gets you.  It simply assumes you would exceed a specific limit because of that. Nothing you can change and not strictly a bug. It's just not a suitable workflow in this case combined with AI's own croojedness.
    Mylenium

  • SVG export / import

    I've been trying to help a client to export its AI data for translation and we have tested the SVG export/import path.
    1) AI (CS4) seems to not be able to open SVG files that it created itself.
         -> What are the best SVG export settings that ensure AI is able to open/display/edit the processed files
    2) After translation of the SVG (in OmegaT), the SVG file contains English instead of Japanese as we can see when opening the file in Chrome/Quicklook (Mac), but when AI opens the file only the original Japanese is displayed.
    I've tried to check the contents of the SVG file with a text editor but the English was there and I could not find why the data was not displayed.
    Does anybody have suggestions on this issue ?
    Thank you in advance.
    Jean-Christophe Helary

    in the >>> file /save as /select svg>>> in svg options there's a preserve illustrator editing capabilities. note: file size increases.

  • Indesign CS4 and SVG export (or lack of)

    I normally do documents in Indesign and then export to pdf (for web and print). I've had a special client request to convert a few of those Indesign document to SVG format.
    This was an option in CS3 that has been taken off CS4.
    What's the best way to produce this? Is there a quick option to do this? The only option I can see is by exporting the Indesign file into eps, opening that into Ilustrator and then saving as SVG. The file could potentially have a lot of pages - so it could be pretty time consuming opening each eps file produced into Illustrator and then saving as individual SVG files. Maybe I can't see the wood for the trees?
    Any help on a better and more efficient way of doing this would be brill.
    Is there a plug in/extension available that makes up for this now redundant option in Indesign CS4?
    Moll O' Moon

    Hi MoMo,
    I noticed this issue right now too. At work I have IDCS3 and here at home CS4. Damn...what a crap! I'd bet that this is just a (stupid) product-strategical decision to take all options fromthe user so that he must chose between Adobe's proprietary Formats and "everything" stays within the Adobe ecosystem.However, thanks to Inkscape I finally got it done.
    pblank

  • How to create new SVG export option

    I need to create a new SVG option to work with exportFile(). The new option will allow me to place a tag on in my exported SVG file. I'm not finding hints in the delivered documentation on how to do this. Could someone with experience in such, please point me to a resource that will help me.
    Thanks in advance.
    Steve

    Hi..
    Its continuous to earlier query, creation of new search help in Personnel Administration, we created elementary search help from SE11, now need to integrate this back end customization to front end screen,
    How to do this.,
    Welcome to all sharing minds.
    Regards.
    Kanuku.

  • InDesign CS3: setting element id's for SVG export

    Hi!
    I created some documents in InDesign which I exported to an SVG File. I wan't to do some DOM manipulation in the SVG file now. Is there a way to set an id to a group of elements which is exported as an group in the SVG file? Or can I export the name of a layer as an attribute or class or whatever is allowed in SVG. So I can easily search for all elements in the xml tree which have been on a specific layer in the inDesign file?
    regards
    marcus

    Have you tried the usual fixes
    http://forums.adobe.com/thread/526990
    http://forums.adobe.com/thread/526991

  • SVG export to Muse

    Hi, I have problems exporting an simple icon vector from Illustrator CS5 to Muse. The export does well, but when I place the file in Muse I don't see the preview (only appears an empty frame), and usually when I save the file, it crashes.
    Anybody can help? Thanks!

    Hi,
    Could you please try some suggestion given in the following threads,
    SVG display problem win 7
    SVG files not rendering in Muse
    Do let me know if you have any question.

  • Svg export

    Hi,
    any idea how to export the text alignment cosen during the creation of the illustrator document when exporting it to svg file format?
    I figured out that text is always algined to the left, even when seeting the text alignment to center. In addition i couldn't find a method to use the paragraph styles.
    I tried also the html pack, but without success.
    Any idea?
    Thanks in advance.
    Joachim

    Joachim, it appears that even InkScape doesn't set the property, at least in my quick testing.
    From reading about this, it seems one needs to calculate the length of the text that is being substituted, the x-offset changed and then the text string displayed. I cannot find any way around that in my quick perusal of information.
    I altered an SVG file produced from InkScape (it writes  XML in a better structure) to produce a string instead of character by character. Character by character is what AI and InkScape both produce. I can give you that SVG file if you want it. It then becomes easier to swap the text as a string. You would still be left with needing to calculate the length of the swapped out text at runtime, but that is doable.
    Heck, here is the SVG file...
    http://www.wenzloffandsons.com/temp/text.svg
    Just copy and paste into a text editor and save it out--and many apologies if you already know all this. You'll find the text string towards the bottom.
    Take care, Mike

  • SVG Export issues

    Since the last update of AI for CC, I haven't been able to export SVGs without them being distorted. I have to check 'preserve illustrator editing capabilities'  and that increases the file size exponentially.

    I do not know the answer to your problem, but for reducing the file size of exported SVG's have a look at the SVG Now extension from David Deraedt:
    https://creative.adobe.com/addons/products/4272

  • SVG export and fonts

    Hi
    How to export SVG document with original fonts in the same size and places as they were in Illustrator CC ?
    Thanks

    You will have to provide screenshots and exact details about your formatting. That aside, SVG native text pretty much shares the same limitations as any dynamically rendered text on the web - not all fonts are available everywhere, formatting rules may not be recognized or used, other stuff can influence the appearance. Even converting to outlines cannot always retain everything, so rather than looking for solutions that do not exist, you might want to educate yourself a bit about this stuff and design your work to spec, not the other way around.
    Mylenium

  • SVG export in CS4

    Hi,
    Can anybody help me to export image file in SVG format. CS4 sdk shows the removal of ISVGExportCommandData, ISVGExportPreferences, ISVGExportSetPrefsCmdData interfaces.
    Its very urgent.
    Please help.

    I experimented with SVG for the first time just now and all I did was create a circle with a radial gradient and changed the
    opacity of the gradient in the Appearance panel.  It seemed to render fine in Safari and Firefox.  Internet Explorer spits out the XML code because it doesn't have Adobe's SVG Viewer built in and Adobe no longer supports its SVG Viewer as of 2009.  So if you're considering a population that will view your content using Internet Explorer be mindful that they will have to choose a different path for viewing SVG--maybe a different plugin or Add-On.

  • Problem in SVG Export

    Hi,
    We're facing a problem generating an image in SVG format. The generated image has an empty background, all in blue. This already had happened before, but the solution was to allocate more memory in oc4j. This solution does not seem to work with SVG format.
    Has anyone passed through this problem?
    If necessary I'll post the map request XML
    Thanks.

    <!--
    @page { size: 21cm 29.7cm; margin: 2cm }
    P { margin-bottom: 0.21cm }
    -->Thanks for the answer Jo&atilde;o.
    In fact, we are using oracle maps.
    May I send you the log through e-mail?
    Follows the map request. (I have changed the datasource, map_cache_name and datasource to a fake one).
    <!--
    @page { size: 21cm 29.7cm; margin: 2cm }
    P { margin-bottom: 0.21cm }
    -->
    <address>&lt;?xml version="1.0" standalone="yes"?&gt;</address>
    <address>&lt;map_request datasource="XXXXX" format="SVG_URL" width="1188" height="840" antialiase="true" srid="8292"&gt;</address>
    <address>&lt;center size="0.5649696304616238"&gt;</address>
    <address>&lt;geoFeature&gt;</address>
    <address> &lt;geometricProperty typeName="center"&gt;</address>
    <address> &lt;Point&gt;&lt;coordinates&gt;-51.1553105,-30.099853500000002&lt;/coordinates&gt;&lt;/Point&gt;</address>
    <address> &lt;/geometricProperty&gt;</address>
    <address>&lt;/geoFeature&gt;</address>
    <address>&lt;/center&gt;</address>
    <address>&lt;themes&gt;</address>
    <address> &lt;theme name="cached_basemap0"&gt;</address>
    <address> &lt;map_cache_theme map_cache_name="XXX.XXXX" snap_to_cache_scale="true" /&gt;</address>
    <address> &lt;/theme&gt; </address>
    <address> &lt;theme name='FILTERS_CITY1231348452513'&gt; </address>
    <address> &lt;jdbc_query asis='true' </address>
    <address> spatial_column='SHAPE' </address>
    <address> jdbc_srid='8292' </address>
    <address> render_style= 'filter_cities' </address>
    <address> datasource='CLARIDATA'&gt;SELECT XXXXX</address>
    <address> &lt;/jdbc_query&gt; </address>
    <address> &lt;/theme&gt; </address>
    <address>&lt;/themes&gt;</address>
    <address>&lt;north_arrow&gt;</address>
    <address> &lt;style&gt;ROSA_DOS_VENTOS_A0&lt;/style&gt; </address>
    <address> &lt;location&gt;35,750&lt;/location&gt; </address>
    <address> &lt;size&gt;40,40&lt;/size&gt; </address>
    <address>&lt;/north_arrow&gt; </address>
    <address>&lt;scale_bar position="SOUTH_WEST" mode="DUAL_MODES" color1="#ff0000" color1_opacity="70" color2_opacity="70" color2="#0000ff" length_hint="183" </address>
    <address> label_font_family="Dialog" label_font_size="11" label_halo_size="3.5" /&gt;</address>
    <address>&lt;geoFeature render_style="LOGO_CLARIDATA_A4"&gt;</address>
    <address>&lt;geometricProperty&gt;</address>
    <address> &lt;Point srsName="SDO:8292"&gt;</address>
    <address> &lt;coordinates&gt;-51.1553105,-30.341686182275325&lt;/coordinates&gt;</address>
    <address> &lt;/Point&gt;</address>
    <address>&lt;/geometricProperty&gt;</address>
    <address>&lt;/geoFeature&gt;</address>
    <address>&lt;/map_request&gt;</address>
    Thanks for helping.

Maybe you are looking for

  • Snow Leopard killed my vga displays!!

    This is by far the most weird problem I have ever encountered after upgrading to a new OS. I run a company where we have something like 15 different Macs. Mostly Intel, but different ages, Mac Pro, Macbook Pro, iMacs, Mac Mini etc. A couple of days a

  • OutlookSyncClient.exe - Entry Point Not Found

    I'm at wit's end with this. I've spent most of last night, and this morning trying to track this down. It all started with the iTunes 7.7 update, but it didn't happen until I started syncing Outlook with MobileMe. I get two error messages, about ever

  • Apps not shared when home sharing itunes library

    I have successfully transfered my itunes library from my old windows xp to my new windows 7 but only 4 newly purchased apps came across. How do I get the rest of my apps to share without having to redownload them from itunes?

  • Advice needed on building first system from scratch...

    Ok, here goes, I am so excited, like a kid on Xmas...My goodies from Newegg will be here later today or tomorrow....I recently purchased: A new tower, Antec PSU, 2x512 Corsair pc3200, MSI K7N2 Delta - ILSR and some other assorted crap.... Anyway, I h

  • Internet no connectivity

    Beyond frustrated and could use some help if anyone has any ideas please. I am connected wirelessly to a wireless-G linsys router that has worked great for 6 months. I have another computer(a pc laptop ) that works fine getting on the internet but fo