How to remove base64 from SaveAsSVG

This is building from the script I was developing that is mentioned here, http://forums.adobe.com/thread/1052584.
As my script loops through and converts EPS to SVG, I am consistently getting large amounts of base64 encoding in the SVG which is unecessarily making the file size large. If I strip out the encoding at the beginning of the file, the main image is undisturbed and the file size is about 500% smaller. Below is the script I am currently using. Is there parameter I can invoke to exclude all of this encoding on conversion? I thought the default for options.embedRasterImages was supposed to be false. Thanks!
ADOBE SYSTEMS INCORPORATED
Copyright 2005-2006 Adobe Systems Incorporated
All Rights Reserved
NOTICE:  Adobe permits you to use, modify, and
distribute this file in accordance with the terms
of the Adobe license agreement accompanying it. 
If you have received this file from a source
other than Adobe, then your use, modification,
or distribution of it requires the prior
written permission of Adobe.
/**          Saves every document open in Illustrator
          as an SVG file in a user specified folder.
// Main Code [Execution of script begins here]
// uncomment to suppress Illustrator warning dialogs
app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
try {
          if (app.documents.length > 0 ) {
                    // Get the folder to save the files into
        var inFolder = Folder( Folder.desktop + '/temp' )
        var files = inFolder.getFiles( /\.eps$/i );
                    var destFolder = null;
                    destFolder = '~/Desktop/temp';
                    if (destFolder != null) {
                              var options, i, sourceDoc, targetFile;
                        // Get the SVG options to be used.
                              options = this.getOptions();
                        // You can tune these by changing the code in the getOptions() function.
                              for ( i = 0; i < files.length; i++ ) {
                  sourceDoc = app.open(files[i]);
                                        // Get the file to save the document as svg into
                                        targetFile = this.getTargetFile(sourceDoc.name, '.svg', destFolder);
                                        // Save as SVG
                                        sourceDoc.exportFile(targetFile, ExportType.SVG, options);
                                        // Note: the doc.exportFile function for SVG is actually a Save As
                                        // operation rather than an Export, that is, the document's name
                                        // in Illustrator will change to the result of this call.
                  sourceDoc.close(SaveOptions.DONOTSAVECHANGES);
                              alert( 'Documents saved as SVG' );
          else{
                    throw new Error('There are no document open!');
catch(e) {
          alert( e.message, "Script Alert", true);
/** Returns the options to be used for the generated files.
          @return ExportOptionsSVG object
function getOptions()
          // Create the required options object
          var options = new ExportOptionsSVG();
          // See ExportOptionsSVG in the JavaScript Reference for available options
          // Set the options you want below:
          // For example, uncomment to set the compatibility of the generated svg to SVG Tiny 1.1
          // options.DTD = SVGDTDVersion.SVGTINY1_1;
          // For example, uncomment to embed raster images
          //options.embedRasterImages = false;
          return options;
/** Returns the file to save or export the document into.
          @param docName the name of the document
          @param ext the extension the file extension to be applied
          @param destFolder the output folder
          @return File object
function getTargetFile(docName, ext, destFolder) {
          var newName = "";
          // if name has no dot (and hence no extension),
          // just append the extension
          if (docName.indexOf('.') < 0) {
                    newName = docName + ext;
          } else {
                    var dot = docName.lastIndexOf('.');
                    newName += docName.substring(0, dot);
                    newName += ext;
          // Create the file object to save to
          var myFile = new File( destFolder + '/' + newName );
          // Preflight access rights
          if (myFile.open("w")) {
                    myFile.close();
          else {
                    throw new Error('Access is denied');
          return myFile;

I managed to dramaticaly reduce the embedded code, by changing some export settings detailed below. It appears to be the fonts embedded as base64 by default. The following works well at reducing the size although not completely eliminating it.
options.embedRasterImages = false;
          //options.compressed  = true;
          options.includeFileInfo = false;
          options.preserveEditability = false;
          //options.includeVariablesAndDatasets = true;
          //options.slices = true;
          options.fontType = SVGFontType.OUTLINEFONT;
    options.fontSubsetting = SVGFontSubsetting.None;
    options.optimizeForSVGViewer = true;

Similar Messages

  • HT1386 The first time I synced my iphone with my mac, I didn't realize that all of my photos from iphoto would transfer over to the phone.   Now, I need to remove some, as they are taking up too much space.  I cannot figure out how to remove them from the

    The first time I synced my iphone 4 with my mac, I didn't realize that all of my photos from the iphoto library would transfer over to the phone (more than 3,000).   Now, I need to remove some, as they are taking up too much space.  I cannot figure out how to remove them from the phone.  I tried to uncheck boxes and sync again, but I get a message that there is no room on the iphone.  I've read as many articles as I can find, but still cannot manage this.  Thanks for any help.

    Open itunes, connect iphone, select what you want, sync

  • How to remove pics from my 3GS...???

    How to remove pics from my 3GS..???

    Photos taken with the phone can be deleted by selecting them and hitting the little wastebasket icon in the right bottom corner.
    Photos you did sync to your phone, can only be removed by deselecting them in the photo pane in iTunes, the following sync will remove them from the phone.

  • Does anyone know how to remove images from google

    i had instagram and i didnt upload images of myself but i only used my own image in the display picture and some how it has gone on to the google image search yesterday i deleted my account but when i checked to see if my images do appear in the google images i had some really bad regrets !! i reallywant to know how i can remove pictures off the google image search  even doe this does not kind of relate thank you .

    Does anyone know how to remove vocals from an import from I tunes...a  polyphonic stereo mix ?
    If you are talking about some "Karaoke" method using Logic I'll try to offer one. Before that I must say that most of the Karaoke methods are based on reversing the Phase of one of the stereo channel and bussing or merging the stereo into Mono. The result is: killing all Pan Centered in the mix - like Main Vocal, Bass, Kick, SN ect.
    The artifacts of the Stereo FX of the main vocal will stay in the Karaoke, cause the FX is stereo etc.
    Here is the Logic Setup I can offer to try some Karaoke trick using Logic.
    1. Import a Stereo mix into a Logic Stereo track.
    2. Create another stereo track and duplicate (copy) the Original Mix region to the duplicated track.
    3. Hard Pan L/R both stereo tracks.
    4. Insert an EQ and Gainer plugins into the duplicated track (R).
    5. Set the Output select of the both tracks to a Bus and assign the new Aux Track Switch mode to "Mono".
    6. Open the Gainer plugin and thick the "Phase Invert" Right button.
    7. To keep the "lowend" instruments like the bass and kick, open the EQ plugin and enable the Low Cut filter and try some Hz settings 80-115, or different Q which will sounds better for your Karaoke.
    P.S Click the image below to show its real resolution!
    Regards,
    A.G
    ======================================
    www.audiogrocery.com
    Author of: Logic GUI Deluxe(Free), Vox De Bulgaria s.a.g.e vocal pack for RMX, Logic Snapshot Console, RMX Power CTRL - Logic Environment Midi editor for Stylus etc.
    ======================================

  • How to remove Unicode from XML file

    I get following error when unmarshal xml:
    [java] org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x15) was found in the element content of the document.
    Anyone know how to remove Unicode from xml file? Can I remove the unicode by rebuild the file?
    Thanks

    These sort of error usually occur when you're using a different character encoding to read the file than the one you wrote it with. Perhaps if you were to post the problem section of the file and/or the code that created it in the first place.

  • How to remove iPhone from a certain computer

    How to remove iPhone from a certain computer along with it's ID to allow another phone to use the comp soley.

    You do not need to do anything.
    Simply stop syncing the iphone to the computer and begin syncing the new iphone to the computer.

  • How to remove Seperator from check-in and profile check in pages

    How to remove Seperator from check-in and profile check in pages
    The seperator is included on the checkin pages, which is present in the std_page with name "std_namevalue_separator", this is called by td_document_checkin_fields and std_document_file_fields.
    Defination of include:
    <@dynamichtml std_namevalue_separator@>
    <$if not isUploadFieldScript$>
    <tr>
         <td width="<$captionFieldWidth$>"><hr /></td>
         <td width="<$captionEntryWidth$>"><hr /></td>
    </tr>
    <$endif$>
    <@end@>
    I have to remove the following include from some of the profile check in page.
    Please suggest if anyone have some idea, how to proceed.
    Thanks,
    Sumit

    791848 wrote:I have to remove the following include from some of the profile check in page.The key here is that you want to do this in some profiles, not all profiles or globally, if I'm reading this right.
    Without writing a component, you can put this code in the "side effects" box in the desired profile(s). This code removes the horizontal rule, and inserts a non breaking space in its place.
    <$setResourceInclude("std_namevalue_separator","<$if not isUploadFieldScript$>
    <tr>
    <td width=\"<$captionFieldWidth$>\"> </td>
    <td width=\"<$captionEntryWidth$>\"> </td>
    </tr>
    <$endif$>")$>YMMV. The non-breaking space may get stripped out in the forum.

  • How to remove text from .swf animation?

    how to remove text from .swf animation? Can no find this text
    in fla file. Flash 8.

    exactly what 'text' are you referring to? text that you typed
    on the Stage using the 'textTool'? simply select the text with the
    'arrowTool' and hit delete.
    If you are referring to a textField that you want to
    eliminate after a certain amount of time, within your animation
    sequence. first copy the text, create a new layer, paste the text
    in place, then where you want to have the text 'disappear' insert a
    'blank keyframe' at that point in the text layer.
    OR place the textfield within a MC and remove it with code.
    OR if the text is dynamic and you wish to use the position at a
    later time, pass a value of null or and empty string to the field
    at the point you wish. And there are other ways still. :) hope one
    of these works for you.

  • How to remove passcode from ipod touch 3g  if power botton is not working?

    how to remove passcode from ipod touch 3g  if power botton is not working?

    Use this program to place the iPod in recovery mode so that you then can restore the iPod via iTunes.
    RecBoot: Easy Way to Put iPhone into Recovery Mode

  • How to remove myself from/leave a team?

    Hi
    I'm using Visual Studio Online in my software development classes. The problem is that the "Accounts list" on my Visual Studio Online portal is crowded with projects from past years. A clean-up is needed.
    I found this solution (https://social.msdn.microsoft.com/Forums/vstudio/en-US/80057697-38d7-4161-8564-13c630943484/vs-tfs-online-how-to-remove-myself-from-a-team-?forum=TFService), but the problem in order to apply it is that I have no more contact with
    a lot of those students + most of their accounts are expired.
    How can I solve this?
    Thanks in advance!
    Evert
    PS: my apologies for any linguistic mistakes... English isn't my mother tongue.

    Hi Evert,
    Based on your description, seems you're the owner of the Visual Studio Online account. If you want to remove your account from the teams that expired, then you can delete the teams directly in team project administrative page of team web access.
    If you only want to remove your account from the teams, then you can click the team and remove your account in administrative page.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • HT4859 kindle fire how to remove items from icloud

    kindle fire how to remove items from icloud

    Kindle Fire's don't work with iCloud, your question makes no sense.

  • How to remove items from iPad home screen?

    How to remove items from iPad home screen?

    Press and hold any of the apps and after a couple of seconds or so they should start to shake. Then press the 'x' in the left corner to delete the ones that you don't want, and when you've finished deleting press the home button so as to stop the shaking. If you don't get the 'x' on any of the apps that you've downloaded (you can't delete built-in apps) then check that Settings > General > Restrictions > Deleting Apps isn't set 'off'

  • How to remove items from my reading lists on my ipad?

    how to remove items from my reading lists on my ipad?

    Swipe across its name in the list and it should get a Delete button on it - tap that and it should be removed from the list

  • How to remove item from my iPhone and iPad on my reading list?

    How to remove item from my iPhone and iPad on my reading list?

    Swipe across its name in the list and it should get a Delete button on it - tap that and it should be removed from the list

  • How to remove FaceTime from iPad

    How to remove FaceTime from iPad

    Me too is having problem with facetime,it started when i was watching on my iswifter browser, then someone call on facetime, when i tried to answer it,it was working fine,but after a connection lost,i tried calling my friend again, and suddenly it wasn't working anymore, i call a lot of times but she said there is no call in her ipad,nobody is recieving my call on facetime since then,and also i cant recieve any from them,everytime i place a call,i cant here it ringing, but after maybe 50seconds i can here to sound tot-tot then the facetime will have a display of connection lost call back!  I tried everything possible to fix it,even reset my network connection,change apple id,mute un mute,force stop... Turn on turn off facetime but nothing is change,until this very moment im still looking for answers!! I was looking for answers how do i uninstall it and then install it again mybe it'll work!!

Maybe you are looking for

  • Page cannot be displayed' error when 2 events (FireAction and GO) fired

    We have created a framework page where FireAction event will be executed when the value of a calendar item is modified. When we modify the value and leave the cursor in the field (without tabbing out), and click GO button, 'Page cannot be displayed'

  • Superdrive ejecting discs after few seconds ...

    Hi, Everthing worked well for 5 months ... After last update of the Tiger to 10.4.5 I have noticed that whatever type of disc I insert superdrive is ejecting it after few seconds. I've tried CD Audio , DVD's ever Tiger installation discs .. all were

  • BP Creation at CIC0

    if someone tries to register a new customer from CIC0 in the system gets error message: area is missing, sold to is missing, business partner is missing. we try to register the customer when a new potential customer(not registered in the system)has c

  • Users receive "Incomplete Logon Data" error when refreshing SSO BW Unv's

    I am receiving an 'Incomplete Logon Data' error for users who try to refresh reports using SSO based universe data connections to BW. The users login to Infoview with WinAD (SSO through Vintella). Their BW alias is already mapped in through the autom

  • Standard appraisal reports don't work for added goals

    the standard reports available from SAP ( 'Export to Excel' for instance) do not work for appraisal documents with free enhancements. I have a requirement to generate a report that will also include goals added by end-users using the free enhancement