Hello everybody,
I am actually working on a project where ADs are coming from a external system; this system has a "bug": it creates EPS files with included images (as expected) but it leaves inside that EPS files OPI comments.
This will cause the Adobe InDesign Client (CS4, 6.0.5) to show this message when exporting the indd doc as PDF using the [PDF/X-3:2002] preset (or any other PDF/X preset because OPI comments are not allowed in PDF/X files):
http://idisk.mac.com/lucabassini/Public/adobe/forum/Picture2.png
When receiving this message, the user can click on the OK button and save the PDF anyway.
Now look at this .jsx I produced for testing purpose:
var myFolder = "/c/test-files/";
var myDoc = "abobe-testcase.indd";
var myPDFExportPreset = app.pdfExportPresets.item("[PDF/X-3:2002]");
var myDocument = app.open(File(myFolder + "/" + myDoc));
var myDocumentName = myDocument.name;
var myPDFName = myDocumentName.replace("indd", "pdf");
var myLinks = myDocument.links;
for (i = myLinks.length-1; i >= 0 ; i--) {
var myLink = myLinks[i];
var myLinkName = myLink.name;
var myNewFolderPath = myFolder;
var myNewPath = myNewFolderPath + myLinkName;
var myNewFile = new File(myNewPath);
if (myNewFile.exists) {
myLink.relink(myNewFile);
}
}
myDocument.exportFile(ExportFormat.pdfType, File(myFolder + "X_" + myPDFName), myPDFExportPreset);
myDocument.close(SaveOptions.no);
The script will end at the bolded line and the message I can see on the InDesignServer console is represented by this:
http://idisk.mac.com/lucabassini/Public/adobe/forum/Picture1.png
Don't care about the message in Italian, it's the same represented by the English dialog.
My question is: is it possible to force the creation of the PDF? Because actually I didn't find any possible solution to accomplish it.
Any help would be very appreciated
Best Regards,
Luca Bassini