Is it possible, using javascript, to copy and rename an existing document?  The copy I have managed and resized the artboard according to my intentions; but I think that the .name property is read-only.  Should I wait until it's time to save him?

post an excerpt from your code so we can see what you have so far.

I think that what you are looking for is:

var doc = app.activeDocument;
var fileName = doc.name.substr(0,doc.name.lastIndexOf('.')) + "_dispro.pdf";        //extract file name and add dispro
var myFolder = Folder("/C/new");      //Folder to save to
var myFile = new File(myFolder +"/"+ fileName);        //Full File Path

saveFileToPDF(myFile);

function saveFileToPDF(myFile){
    //Setup Save Options for PDF
    var saveOpts = new PDFSaveOptions();
    saveOpts.compatability = PDFCompatibility.ACROBAT6;     //upped this to ACROBAT6, was at ACROBAT5
    saveOpts.generateThumbnails = true;
    saveOpts.preserveEditability = true;
    //
    var originalInteractionLevel = userInteractionLevel;        //save the current user interaction level
    userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;      //Set user interaction level to suppress alerts
    doc.saveAs(myFile,saveOpts);        //Save File
    userInteractionLevel = originalInteractionLevel;        //Set user interaction level back to original settings
}

Tags: Illustrator

Similar Questions

  • Should I wait until iTunes game done on Mac before turning on my iPhone?

    Should I wait until iTunes game is made download and correspondent of iTunes on Mac before attempting to turn on iCloud music library on my iPhone?

    I had a horrible experience and cancelled my subscription Match because it made my iPhone go crazy and brought me to wipe and treat Apple (legal dept) customer relations in order to compensate me financially for the bug that downloads songs on cell when it is not supposed to and draining my battery in a few hours and cause invites every 10 seconds (without exaggeration).

    I was wondering if I should wait 2 weeks first for my collection has been completely downloaded first. It would be too iOS 9. In any case...

    Hello

    Yes. Once match / download process is complete, you can then activate the game on your phone but there is no need to wait two weeks. I suggest that you add the iCloud status column to song in your iTunes library. This will tell you which corresponded, downloaded, purchased, ineligible, duplicate or pending.

    Jim

  • I got a subscription to Adobe Captivate 8 in February. Can I cancel my subscription 8 Captivate without penalty (as I'm moving to Captivate 9), or should I wait until the year is to be upgraded?

    I got a subscription to Adobe Captivate 8 in February. Can I cancel my subscription 8 Captivate without penalty (as I'm moving to Captivate 9), or should I wait until the year is to be upgraded?

    HI Brendan Strong,

    Subscription is not attached to the version of Captivate. You can download 9 Captivate and use the same subscription id. Make sure you disconnect from Captivate 8, as this is considered to be new use for instance of Captivate with the subscription ID.

    Thank you

    Sexy.

  • Thus, it has been some time since iOS 9.2.1 happened, but I still have not downloaded it. What is the consensus on this update, is it useful to download or should I wait until 9.3?

    Thus, it has been some time since iOS 9.2.1 happened, but I still have not downloaded it. What is the consensus on this update, is it useful to download or should I wait until 9.3?

    Yes.

    Yes/No - up to you.

  • File placed in Mac server with read/write access to all the world, but when a Windows machine changes and saves the file, it becomes read-only

    Original title: Excel file permissions

    At my work, all except 2 computers are Macs. I'm one of the only Windows machines. I created an Excel file which I want everyone at the office to access and modify. We have put on the Mac server and changed the permissions for everyone to read and write. I also had that done on the Windows machine before placing it on the server. However, people on Mac machines can open, change it and save it without problem. But if one of the machines Windows opens, modifies and saves, it restores the Mac machines to read-only. Anyone know how to fix this?

    Hi amber,

    Please contact the Microsoft Community.

    I would have you post here for further assistance.

    http://social.technet.Microsoft.com/forums/Windows/en-us/home?Forum=w7itpronetworking

    Let us know if you have any other problem with Windows in the future.

  • I have a problem with all the files and folders on the computer appearing as 'read only '.

    Original title: scourge, each folder and file on each disc are read only and I can't change an any of them

    What happens on my main server. When I choose to change something to read only to normal, he said read only status of disabled, but if I try to change the file or folder I can't change it and if I re - check its properties I find once again, it is read-only. I looged as the admin and I tried everything to put the file or folder read-only point and nothing happening. I plugged a flash drive for only to find that it was read-only.

    Full Scan Virus and there are 10 viruses in my computer, 8 of the virus could be eliminated by removing the leader and two of them were to be eliminated by deleting the infected file.

    The result is that my computer works fine now!

  • SE message: changes made to this photo has not been saved. The file may be read-only or you are not allowed to check-in at the location of the photo, trying to crop an image, or mount it

    Original title: photos

    If I try to crop a photo or repair, it has a message of: changes made to this photo has not been saved. The file may be read-only or you may not save to the location of the image.

    They worked very well the other day, what's past?

    Hi boneyardwolf,

    1. where are the photos?

    2. you have any third-party photo editing software?

    3. what type of files you want to change?

    You can check the following link and try the steps suggested by Marilyn - Support Engineer Moderator Wednesday, March 4, 2009 04:47 and see if it helps to solve the problem

    http://social.answers.Microsoft.com/forums/en-us/vistapictures/thread/9f6bf1f8-50EC-4baa-b2c5-212c823ded68

    Hope this information is useful.

    Jeremy K
    Microsoft Answers Support Engineer
    Visit ourMicrosoft answers feedback Forum and let us know what you think.

    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Save the questions: message error "the file may be read-only.

    I do a lot of scanning to PDF and will often add a page newly digitized to an existing pdf archived and then resave it.

    I have a very consistent workflow and use both screens. The folders that contain the files are still on my second monitor while I work on the main screen.

    After that I inserted the page newly digitized in the existing pdf very often I get an error Impossible to save the file:

    The file may be read-only or another user can open. Please save the document under a different name or in a different folder.

    I'm the only user, none of the files are read-only, and I am sure that the file I'm re-record is not enabled (I see that on my second screen).

    Sometimes, if I click on the second screen to another folder, he'll let re-register me, but other times I have to close the Windows Explorer completely.

    I would avoid renaming of files: it is important to keep the name of the original file.

    This seems to happen a lot more with Acrobat X Pro version 9. It's very embarrassing.

    No known workaround solution?

    DG

    The folders that contain the files are still on my second screen

    In the case of Windows (a Mac user will have to talk about this for the environment).

    If Windows Explorer is "focused" on the file (for example, the file selected) or has the "focus" on the parent or the files folder/directory you get the alert dialog box.

    Close Windows Explorer or place its development d.

    In addition, if the preview feature is used for files in a folder (or in a nested subfolder files) you will experience similar "speed humps" in the path of the workflow.

    Was not always in this way, but the OS updates (XP, Vista, etc.) seem to have given us some clever new options which, by coincidence, there are some pitfalls.

    Be well...

  • I use outlook express 6 and I can receive an email of great but when I try to send it after making the necessary changes, i.e. the signature I get the message 'too big for the server.

    I use outlook express 6 and I can receive an email of great but when I try to send it after making the necessary changes, i.e. the signature I get the message "too big for the server" responses I've seen so far tell me absolutely nothing

    Well, the error message says it all.  "" too big for server".

    There is a limit imposed by your ISP/mail server, which you don't mention.

    Not only the servers have limits on the size, this is not necessarily the same for incoming and outgoing messages.

    If you say you use the e-mail program and the name of your e-mail server, maybe we can shed light on the more specific issue, but the problem is definitely with them and not Outlook Express.

    P.S. I'm not sure what you mean by 'signature'

  • Word 2007 your AutoCorrect, MSO1033.acl, file could not be saved. The file may be read-only, or you do not have permission to modify the file.

    To get this message when opening Word 2007.

    Your AutoCorrect file, (Japanese weird character? with) MSO1033.acl, could not be saved. The file may be read-only, or you do not have permission to modify the file.

    ALSO when I try to close or save a Word 2007 I get this message:

    Word cannot save or create this file. Make sure that the disk you want to save the file on is not full, write-protected, or damaged. (C:\Program Files\... Normal.dotm)

    I then click on Cancel to not save the changes and then get the following message appears:

    Changes have been made that affect the model overall, Normal. You want to save these changes?

    I click No. in addition to this I'm currently not able to print from word 2007 older that I created a few months before this problem started

    I studied that went through all the troubleshooting steps suggested Microsoft to resolve this issue, but have had no luck... any other help or suggestions would be appreciated. I'm not

    Thank you!!
    Frustrated in minutes

    Install the fixit from article KB2258121 (fixit #50461).

    Although this problem is not mentioned in the KB problem, the fixit indeed solves this problem.

  • When you try to put the graphic in the library «the file may be read-only...» »

    Hi all

    I thought that I try the new tools of the CC library.

    But when I want to place a symbol in a library, I get this warning:

    "The file may be read-only or another user can open. Please save the document under a different name or in a different folder. »

    The symbol is on a whole new document, created and recorded by me, and there is no one else around me.

    The funny thing is only economy/add the colors of this symbol in the library is no problem at all.

    Reserving the document does not resolve this issue.

    So what's going on/false?

    Ok

    Thanks the Apple community, I solved this problem.

    Yes, I can add assets to any CC library!

    It has everything to do with permissions.

    This response to my post on the Apple Forum has resolved:

    A link to this post

    Why Adobe can't happen at such a response?

  • IAM trying to connect my laptop to my TV using a cable video. s, but I can't do now.i once before, but I think that I went somewhere and cloned it .anybody me help please jack

    trying to connect my laptop to my TV can't do it now, I did it once before, but I think that I went somrwhere and cloned it .can sume one help me pleas jack.      E-mail address is removed from the privacy * if we're cut off

    Hello

    I suggest you to refer to this link and check if it helps:

    http://Windows.Microsoft.com/en-us/Windows7/connect-your-computer-to-a-TV

    It will be useful.

  • My computer redirects me to random pages and turn my CPU at 100%... I think that his "ping.exe".can someone help?

    Original title: ping.exe

    I have something on my computer that redirects me to random pages and runs my CPU at 100%... I think that his "ping.exe".can someone help?

    MalwareBytes's AntiMalware - no AntiVirus. ;-)

    Probably your best bet - flatten (wipe) the system and start from scratch.  You will need your most recent backup (your stuff, like your documents, photos, music, video, spreadsheets, databases, presentations, bookmarks/Internet favorites, e-mail contacts, serial number, proof of purchase/receipts, that may have been scanned in, etc. and so on...) and a good list of installed software and hardware specifications (I suggest Belarc Advisor running on the current system and print the results if possible) then you can get the drivers before or after installation.

    Of course, you will also need your multimedia installation product key/serial numbers and that go hand in hand.  In Windows XP - there is no way for me to know (without telling you) what level your installation CD is... so you will need to install the SP2 and SP3 after installing the operating system.  I would leave it disconnected from the Internet (physically) until it is at least SP3 and you have confirmed its firewall is enabled and, if possible, you have installed an antivirus application.

    For you, I suggest the eSet 32 antivirus (not more) - which costs ~ $60 every two years for private users.  Add to that the MalwareBytes full package which costs, if I remember, ~ $25 for life.

    Then, once the system * is * connected to the Internet (physically) - get hardware drivers installed for everything and the rest 100 + installed post-SP3 updates.  Then you can worry about all your other programs and restore your files LAST.

  • The name property using

    Hello

    I need help with my code.

    The user clicks on an element any onstage. The element has a name. The issue begins to animate (chronology of animation image based).

    When the user clicks on an order of the day, we need to animate in sync with the first.

    For example - when the first element at this moment there reached the plot of 24, then the second element begins to animate the 24 frame forward.

    And the same to what the user clicked four elements.

    I tried to use the name of the element as a parameter for the ID of the element that was clicked first. But Flash don't like my code.

    On the "BOLD" line, it gives the error message:

    TypeError: Error #1010: a term is undefined and has no properties.

    private var TheLeaderTree: String;

    private void setUp(): void

    {

    this.addEventListener (MouseEvent.CLICK, playAnim);

    }

    private void playAnim(event: MouseEvent): void

    {

    If (.numberForTreeAnimation of the object (this.parent.parent) == 0)

    {

    TheLeaderTree = myIdName;

    gotoAndPlay ("playAnim01");

    Object (this.parent.parent) .countForTreesAnimation ();

    }

    on the other

    {

    this.gotoAndPlay (Object (this.parent). TheLeaderTree.currentFrame);

    Object (this.parent.parent) .countForTreesAnimation ();

    }

    }

    Thank you very much in advance for the help!

    I guess just, but if TheLeaderTree is a private variable and then you cannot reference from outside the class for any object that has the same private variable.

    In addition, if you set the name property to this variable, the name property is a string, not an object.  So when you try to target a string you are not likely to be successful...  Probably, you'd better use something like...  TheLeaderTree = this;

    What you probably need to do, is to have a variable on the main timeline, you assign the identity of the main shaft and your trees target this variable when assigning or reading the value.

  • The emails in my hotmail Inbox and deleted folder disappeared with a few hours. I think that some illegally accessed my account, can I find out who did this to my emails?

    The mails in my Inbox hot mail and deleted folder disappeared within a few hours.  I think that some illegally accessed my account, can I find out who did this to my emails?

    Hello

     
    Since the problem is related to the hotmail account, I suggest you to send your application in Windows Live Solution Center.
    http://windowslivehelp.com/solutions.aspx?ProductID=1
     
    Thank you.

Maybe you are looking for