Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Script to automate saving pdf in Illustrator 2017

Community Beginner ,
Jul 07, 2017 Jul 07, 2017

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

3.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Jul 07, 2017 Jul 07, 2017

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 07, 2017 Jul 07, 2017

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

with menu commands...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 07, 2017 Jul 07, 2017

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

Screen Shot 2017-07-07 at 12.02.19 PM.png

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 07, 2017 Jul 07, 2017

i will give it a try and post back this evening. Thanks.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 07, 2017 Jul 07, 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.

Screen Shot 2017-07-07 at 8.07.15 AM.png

You may want to try the forum for scripting

Illustrator Scripting

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 07, 2017 Jul 07, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 08, 2017 Jul 08, 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 08, 2017 Jul 08, 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 08, 2017 Jul 08, 2017

I was wondering if I can use automator or extendscript to do the task above.

Can someone point me at least to a tutorial that can help me?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 09, 2017 Jul 09, 2017
LATEST

Used to be there were sample scripts installed with the rest of the package. One of them was a SaveAsPDF script. Look around in your application folder and you can also check in the Illustrator Scripting forum, one door down.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines