Skip to main content
Participating Frequently
July 7, 2017
Question

Script to automate saving pdf in Illustrator 2017

  • July 7, 2017
  • 3 replies
  • 3801 views

I would like to automate(script) a workflow which saves my current file as pdf.

as it is, here are my current mouse clicks:

Go to file: Save as

Select, if not selected, pdf format.

Check to save in the same location as the original folder

Select the pdf options which are a pdfx-1a hybrid.

Done.

I would love to simplify those steps with one click.

Can that be done withe Javascript or Applescript?

Thanks,

Freddie

    This topic has been closed for replies.

    3 replies

    Participating Frequently
    July 8, 2017

    I was able to create the menu action.

    My problem is that the action keeps saving the pdf into the folder that started the action.

    If I open another ai file in a different folder, I get a quick, nice pdf in the WRONG location,

    which brings me back to my original question: "Check to save in the same location as the original folder".

    it seems to me it should be a simple solution in tweaking the code a little bit.

    Am I not in the scripting portal of the support site?

    Freddie

    Mike_Gondek10189183
    Community Expert
    Community Expert
    July 8, 2017

    That is exactly what I told you would happen, did you not read my post? Best you can do is save to the desktop, this way you can manually move this into the folder you need. I usually have the foyer open already so is just a quick drag and drop if you ape your desktop tidy.

    Participating Frequently
    July 8, 2017

    I did read your reply Mike, I just thought that there would be a simple solution.

    Saving to the desktop defeats the purpose for me.

    It seems to me that the same steps that I do to:

    1_Go to the file menu.

    2_Click on Save as.

    3_Check that I'm saving the file in the correct folder.(same as original)

    4_Check that I select the pdf format.

    5_Replacing if necessary by clicking ok in case I'm replacing the same file.

    6_Selecting my pdf options.

    7_Finally click ok.

    I do these 6 or 7 steps daily in my workflow.

    From what I gather, I can action script some, but not all.

    Correct?

    Is there an aftermarket solution for this?

    Mike_Gondek10189183
    Community Expert
    Community Expert
    July 7, 2017

    I do that with an action, but that works since I save to my desktop, and uses my last used pdf settings. I add a stop, because illustrator crashes when action have steps the perform very quickly next to each other. If you record the action and choose the folder your file resides in, un fortunately any future running of that action will save to that same folder and not next to you .ai file.

    You may want to try the forum for scripting

    Illustrator Scripting

    Actions in Illustraror have sadly never been updated and are very limited.

    Doug A Roberts
    Community Expert
    Community Expert
    July 7, 2017

    yes, but it'd be simpler to do it with an action.

    Participating Frequently
    July 7, 2017

    When I record the action I get zilch!...Nada. I thought actions didn't work

    with menu commands...

    Mike_Gondek10189183
    Community Expert
    Community Expert
    July 7, 2017

    Actions do record most menu commands, there is even a way to add stubborn ones to record if needed.

    Not sure what exact steps you took to try an make an action, but you should be able to record all the steps I have shown. You can then insert a stop as I did using the fly-out  menu in action panel.

    Did you make a new action or miss that and the steps got added to an existing selected action.

    Use actions to automate tasks in Illustrator