I am trying to export selection which contains more than one objects. It should be exported as single jpeg object. I can do it for single selection but could not able to do it for multiple objects. Throwing the below error...
How to do it for selection of multiple objects?
var jpgName = "/Applications/Adobe InDesign CS6/Scripts/Scripts Panel/Test/SAMPLE.jpeg"
function ExportAsJPEG(obj, tName)
embedColorProfile = true;
jpegQuality = JPEGOptionsQuality.MAXIMUM;
exportResolution = 120;
jpegColorSpace = JpegColorSpaceEnum.RGB;
jpegRenderingStyle = JPEGOptionsFormat.BASELINE_ENCODING;
simulateOverprint = false;
antiAlias = true;
transparentBackground = false;
useDocumentBleeds = false;
exportingSpread = false;
jpegExportRange = ExportRangeOrAllPages.EXPORT_ALL;
In the case of multiple objects the app.selection would be an array and an array does not have the method exportFile so the error does make sense. As regards to what you are trying to do i would suggest to do the following
Thank you.... Actually i had tried this flow but its also thrown error...
Now i rectified my error.. I used wrong format JPEG instead of JPG.
obj.exportFile(ExportFormat.JPEG, File(tName)); -- Error
obj.exportFile(ExportFormat.JPG, File(tName)); --- Correct
Now its working...
- Sudha K