Skip to main content
TySprice
Inspiring
January 20, 2023
Question

Illustrator V27.1 Export For Screens Via Script Issues

  • January 20, 2023
  • 4 replies
  • 1998 views

Alright, so I had a script that was working perfectly prior to this version of Illustrator. With this update when attempting to export for screens via the script I ocassionally get the wonderful "Unable to export the following files:" message. I am exporting JPG100 files using resolution as the scaling. There is an algorithm in the script that ensures the resolution is anywhere from 72DPI if exporting the entire canvas to 2500DPI if exporting a .1" x .1" square. The GUI of the script reports what resolution it will be exporting the files at. The strange thing is that when the script fails to export at a certain resolution, exporting it manually through the built in Export for Screens at the same resolution works. I am just curious if anyone has run into any similar issues. I can provide additional information and screenshots if needed.

This topic has been closed for replies.

4 replies

TySprice
TySpriceAuthor
Inspiring
January 21, 2023

If anyone wants to mess with the algebra in this script a tool I found very helpful was:
https://www.desmos.com/calculator

 

The resolution calculation takes place in a function called "getAutores()". It uses a curve that is plotted using y=mx^-1. The y axis is the resolution and the x axis is a size average of an artboard (width+height/2).

In the mean time I think I am just going to re-work this script so that it exports either .tiff or .psd files as I have direct control over the resolution of those exports using the Document.exportFile() method and adjusting ExportOptions. It is definitely a bit more sloppy as I will have to have Photoshop open these files, save them as jpegs with the settings I need and then delete the .tiff or .psd file. Should be a sufficient work around while this original script is unstable in the latest updates.

Anubhav M
Community Manager
Community Manager
January 26, 2023

Hello @TySprice,

 

Thanks for sharing the script and sample file. Kindly allow us some time while I check this with the team.

 

Thanks,

Anubhav

m1b
Community Expert
Community Expert
January 21, 2023

Small update: I just installed the updated AI 27.2 and it still bombs out the debugger, but now it displays a message:

"Unable to export the following files: 17.jpg"

m1b
Community Expert
Community Expert
January 20, 2023

Hi @TySprice, could you also confirm that your script is using "Export for screens" or another export method? It would help if you are able to share the script, or part of it, so we can test, too.

- Mark

TySprice
TySpriceAuthor
Inspiring
January 20, 2023

Thanks for your help. Here is the full script if you want to take a look. It is using Export for Screens.

https://github.com/Tylersprice96/Shared-Code/blob/b529797ad08e398851823390d3f04b670b64e354/Make%20Proof.jsx

TySprice
TySpriceAuthor
Inspiring
January 20, 2023
Anubhav M
Community Manager
Community Manager
January 20, 2023

Hello @TySprice,

 

Thanks for reaching out. Would you mind trying to install a prior version of Illustrator (https://helpx.adobe.com/download-install/kb/downloaded-older-app.html) and sharing your observations?

Also, kindly share some screenshots and snippets of the script, if possible, so that we can look at it.

 

Looking forward to your response.

 

Thanks,

Anubhav

 

 

TySprice
TySpriceAuthor
Inspiring
January 20, 2023

I have installed Version 27.0 and 27.0.1 and it works fine in both of those.
Here is the script if you want to take a look:
https://github.com/Tylersprice96/Shared-Code/blob/b529797ad08e398851823390d3f04b670b64e354/Make%20Proof.jsx

TySprice
TySpriceAuthor
Inspiring
January 20, 2023