Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

Tweaking the SaveDocsAsPDF script

$
0
0
Hello. Absolute scripting newbie here; will someone take pity...?

I am looking at the SaveDocsAsPDF script. It works for our purposes except I would like it to save PDFs using a Preset we created called "SGS PDFs. (We have trouble with people in our office forgetting to choose this setting, so I thought a script might be the answer.)

I found a posting on this forum where someone wanted to save files as small as possible, and got some clues from that. So I left everything as is in the original script, except I added this first line in the function:
{var NamePreset = '[SGS PDFs]';

Then after the line:
var options = new PDFSaveOptions();

I added:
options.PDFPreset=NamePreset;

I thought this would result in a script that does the same thing I now do "manually". However, if I save my document "manually" using File/Save As/ Adobe PDF, and choosing the SGS PDFs preset (and changing nothing else), I get a 716 KB file. But if I use my script, I get a 4.9 MB file. So it appears that what I added is NOT making the script use my preset settings.

So my question is: Is there something REALLY basic missing from my script, or... In order to get a script that accomplishes everything already determined in the Preset, do I manually have to list all those settings as options?

I think I can do the latter if I need to if I just study some of the other scripts... unless there's a shortcut!

Viewing all articles
Browse latest Browse all 12845

Trending Articles