При сохранении PDF скриптом не срабатывает параметр Optimization. Не подскажете, почему?
Код:
function saveFileToPDF (dest) {
var doc = app.activeDocument;
if ( app.documents.length > 0 ) {
var saveName = new File ( dest );
saveOpts = new PDFSaveOptions();
saveOpts.compatibility = PDFCompatibility.ACROBAT5;
saveOpts.generateThumbnails = true;
saveOpts.optimization = true;
saveOpts.preserveEditability = true;
saveOpts.bleedOffsetRect = [2,2,2,2];
saveOpts.trimMarks = true;
//======================= COMPRESSION ===========================
saveOpts.colorCompression = CompressionQuality.JPEGMAXIMUM;
saveOpts.colorDownsamplingMethod = DownsampleMethod.BICUBICDOWNSAMPLE;
saveOpts.colorDownsampling = 300;
saveOpts.colorDownsamplingImageThreshold = 450;
//-----------------------------------------------------------------------------------------------------------
saveOpts.grayscaleCompression = CompressionQuality.JPEGMAXIMUM;
saveOpts.grayscaleDownsamplingMethod = DownsampleMethod.BICUBICDOWNSAMPLE;
saveOpts.grayscaleDownsampling = 300;
saveOpts.grayscaleDownsamplingImageThreshold = 450;
//-----------------------------------------------------------------------------------------------------------
saveOpts.monochromeCompression = MonochromeCompression.CCIT4;
saveOpts.monochromeDownsamplingMethod = DownsampleMethod.BICUBICDOWNSAMPLE;
saveOpts.monochromeDownsampling = 1200;
saveOpts.monochromeDownsamplingImageThreshold = 1800;
//==================== END OF COMPRESSION =======================
saveOpts.colorConversionID = ColorConversion.COLORCONVERSIONREPURPOSE;
saveOpts.colorDestinationID = ColorDestination.COLORDESTINATIONWORKINGCMYK;
doc.saveAs(saveName, saveOpts );
}
}