InDesign Server vs. Desktop
Posted: Mon May 26, 2014 12:45 pm
When making JavaScripts there is apparently a few differences between InDesign Desktop And InDesign Server. I have the script below working in Switch with InDesign CC in the desktop-version. If I replace the desktop-version with InDesign Server and run the same script, Switch messages returns an error.
Running the first 13 and the last line work fine with InDesign Server, so I figure it has something to do with the PDF export. Anyone has a clue?
var myEasyCatalog = app.easycatalogObject;
myEasyCatalog.workspaceFolder="C:EC_projektEasyCatalog Workspace";
var myDS = app.easycatalogObject.datasources.item("Pricesign_base.xml");
var myDV = myDS.dataviews.add();
myDS.synchronizeWithDataSource();
myDS.purgeDeleted();
var myDoc = $doc;
var myDV = myDS.dataviews.item("Pricesign_base.xml");
myDV.makeSelection(1,10000);
var myInsertionPoint = app.documents[0].pages[0].textFrames[0].
insertionPoints[0]
myDV.paginateIntoTextFlow(myInsertionPoint, "c:EC_projektEasyCatalog_Pricesign_Library.indl");
var PricesignPath = "c:UsersAdministratorPDF";
var pdfName = myDV.records.item("1").fields.item("Ticket").fieldContent;
var FileType = ".pdf";
var myFile = (PricesignPath+pdfName+FileType);
var myPDFExportPreset = app.pdfExportPresets.item("Press Quality");
$doc.exportFile(ExportFormat.pdfType, myFile, false);
myDV.closeDataView()
Running the first 13 and the last line work fine with InDesign Server, so I figure it has something to do with the PDF export. Anyone has a clue?
var myEasyCatalog = app.easycatalogObject;
myEasyCatalog.workspaceFolder="C:EC_projektEasyCatalog Workspace";
var myDS = app.easycatalogObject.datasources.item("Pricesign_base.xml");
var myDV = myDS.dataviews.add();
myDS.synchronizeWithDataSource();
myDS.purgeDeleted();
var myDoc = $doc;
var myDV = myDS.dataviews.item("Pricesign_base.xml");
myDV.makeSelection(1,10000);
var myInsertionPoint = app.documents[0].pages[0].textFrames[0].
insertionPoints[0]
myDV.paginateIntoTextFlow(myInsertionPoint, "c:EC_projektEasyCatalog_Pricesign_Library.indl");
var PricesignPath = "c:UsersAdministratorPDF";
var pdfName = myDV.records.item("1").fields.item("Ticket").fieldContent;
var FileType = ".pdf";
var myFile = (PricesignPath+pdfName+FileType);
var myPDFExportPreset = app.pdfExportPresets.item("Press Quality");
$doc.exportFile(ExportFormat.pdfType, myFile, false);
myDV.closeDataView()