I'm using Adobe InDesign Server CC and I want to do datamerging. It does merging well, the only problem is that Indesgin Server is SO SLOW. Here is my code:
var source = File(app.scriptArgs.getValue("sourceIndd")); //.indd file
var destination = File(app.scriptArgs.getValue("destination"));
var sourceData = File(app.scriptArgs.getValue("sourceData")); //csv file with data be placed into placeholders
var resolution = app.scriptArgs.getValue("resolution");
var doc = app.open(source,OpenOptions.DEFAULT_VALUE);
doc.dataMergeProperties.selectDataSource(sourceData);
doc.dataMergeOptions.linkImages = true;
doc.dataMergeProperties.mergeRecords();
app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.low;
app.jpegExportPreferences.exportResolution =parseInt(resolution) ;
app.jpegExportPreferences.antiAlias =true;
app.documents.item(0).exportFile(ExportFormat.JPG, destination);
doc.close();
This code is used for preview generating so QUALITY IS NOT IMPORTANT. Does anybody know how I can speed this up? Or maybe there is another away to export previews?