[Typo] ExportOptionsTIFF.IZWCompression of Illustrator JavaScript Reference.pdf
There is a typo in ExportOptionsTIFF in Illustrator JavaScript Scripting Reference.pdf, which fails to specify whether or not LZW compression is used. Please correct it.
I have checked and it was wrong from the CS6 version.
Expected Name: lZWCompression (begins with a lowercase L)
Actual Name: IZWCompression (begins with an uppercase i)
The function name in the example is also wrong. exportFileToTIFF should be correct.
Exporting to TIFF format
// Exports current document to dest as a TIFF file with specified
// options, dest contains the full path including the file name
function exportFileToPSD (dest) { // <-- exportFileToTIFF
if ( app.documents.length > 0 ) {
var exportOptions = new ExportOptionsTIFF();
var type = ExportType.TIFF;
var fileSpec = new File(dest);
exportOptions.resolution = 150;
exportOptions.byteOrder = TIFFByteOrder.IBMPC;
exportOptions.IZWCompression = false;
app.activeDocument.exportFile( fileSpec, type, exportOptions );
}
}
-
mer C commented
This may have been misleading, but specifying the correct property name "lZWCompression" (starting with a lowercase L) can set whether to compress or not.
It means that the typo in the PDF continues to increase those who cannot specify lZWCompression.