Hi,
i have java web application, that use indesign server to export idml files as PDF.
The workflow:
1. open the idml file
2. export the idml as pdf
3. close the idml file
Sometimes this error occured: Error 111626 : Server cannot open the idml file. This is not a valid InDesign Interchange document.
When this error occures, aftert that the indesign server sends the same error for all following idmls, that I try to export.
The consequent is that I have to stop the server and start it again.
I just have this behaviour only with this error code. For all others errors the server works fine and export all idmls correctly.
What can I do. I don't want to restart the server everytime.
Can you help me ?
Thanks + Cheers
Michèle
Hi,
I didn't use JavaScript to Export the PDF, but Java SDK.
Try with this code:
var result = "No documents are open.";
if(app.documents.length > 0){
var myFile = new File("/c/ServerTestFiles/myTestDocument.pdf");
var result = "exported to: " + myFile.fullName;
if(!myFile.parent.exists && !myFile.parent.create()) {
result = "Not exported. Unable to create the folder: " + myFile.parent.fullName;
} else {
app.documents.item(0).exportFile(ExportFormat.pdfType, myFile, app.pdfExportPresets.item("[Press Quality]"));
}
}
result;
That's an example, that I found in the doumentation.
Cheers
Michèle
Hi Vinayak,
hier is an example how to open a document:
var myFile = new File("/c/ServerTestFiles/myTestDocument.indd");
// OPEN
var myDocument = app.open(myFile);
After that you can export it as PDF. Don't forget to close the document. when you're done
if(app.documents.length != 0){
app.documents.item(0).close();
} else {
var result = "No documents are open.";
result;
}
I hope it helps you ![]()
Cheers,
Michèle
North America
Europe, Middle East and Africa
Asia Pacific