Export to PNG saves as blank script Illustrator CS6
I have the below script to export as PNG. It works well in CC, but when performed in Illustrator CS6, it saves as blank PNG file. No contents are appearing.
function exportToPNGFile(locToSave) {
var doc = app.activeDocument;
var exportOptions= new ExportOptionsPNG24 ();
var type= ExportType.PNG24;
var fileSpec= new File(locToSave);
exportOptions.artBoardClipping = false;
exportOptions.antiAliasing= false;
exportOptions.transparency= false;
exportOptions.horizontalScale = 100.0;
exportOptions.verticalScale = 100.0;
doc.exportFile(fileSpec, type, exportOptions);
}
