Quantcast
Channel: Adobe Community: Message List - Photoshop Scripting
Viewing all articles
Browse latest Browse all 27456

Ps6 Win js SAVEFORWEB problem with .ai and .pdf

$
0
0

Hi,

I'm beginning with javascript and have a script which ends with SAVEFORWEB.

 

It works very fine with .jpg, .tiff, .psd files but when I'm importing .ai or .pdf to Ps6, I have 8103 error.

Manual "Save for web" works very fine, but I would like to do it through script.

 

doc = app.activeDocument;

var Name = doc.name.replace(/\.[^\.]+$/, '');
var saveFile = File(doc.path + "/" + Name + ".jpg");
var options = new ExportOptionsSaveForWeb();
options.quality = 60;
options.format = SaveDocumentType.JPEG;
options.optimized = true;
options.includeProfile = false;
options.interlaced = 0;
options.transparency = false;
doc.exportDocument(saveFile, ExportType.SAVEFORWEB, options);

doc.close(SaveOptions.DONOTSAVECHANGES);

 

I think it's because of rasterisation but I have no idea how to work it out.

Thank you


Viewing all articles
Browse latest Browse all 27456

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>