Copy link to clipboard
Copied
Try this:
try{
var myDoc = app.activeDocument;
var myOutFolder = new Folder("~/Desktop");
var myPackageOk = myDoc.packageForPrint(myOutFolder,
true, // copyingFonts
true, // copyingLinkedGraphics
false, // copyingProfiles
true, // updatingGraphics
true, // includingHiddenLayers
true, // ignorePreflightErrors
true, // creatingReport
true, // includeIdml
false, // includePdf
undefined, // pdfStyle
false, // useDocumentHyphenationExceptionsOnly
undefined, //
...
I don't see what was so difficult in this, the error itself clearly mentions what's the problem. The following line
proFiles.push(myDocNameF);
Copy link to clipboard
Copied
Try this:
try{
var myDoc = app.activeDocument;
var myOutFolder = new Folder("~/Desktop");
var myPackageOk = myDoc.packageForPrint(myOutFolder,
true, // copyingFonts
true, // copyingLinkedGraphics
false, // copyingProfiles
true, // updatingGraphics
true, // includingHiddenLayers
true, // ignorePreflightErrors
true, // creatingReport
true, // includeIdml
false, // includePdf
undefined, // pdfStyle
false, // useDocumentHyphenationExceptionsOnly
undefined, // versionComments
false // forceSave
);
}
catch(e){
alert(e);
}
Copy link to clipboard
Copied
Hi @Kasyan Servetsky ,
Thanks for responding and it is working perfectly for the active document. But if it is applied in the loop for the multiple applications i get the error above mentioned.
Is anything wrong with myDoc variable in the batch? or something else.
Please help.
@Kasyan Servetsky And thanks for your contribution to the fellow people. It is very helpful to learn alot as a beginner like me.
Thanks,
Singaaram
Copy link to clipboard
Copied
I don't understand what you mean by 'multiple applications' and 'myDoc variable in the batch'.
If you want to batch process (package) multiple documents, try this script adjusting it to your requirements.
Copy link to clipboard
Copied
HI @Singaaram,
You modified the script and said that you get errors. But, you never shared the script, the error you get alongwith the missing information on how you tested it, then how can we guess what the issue is?
-Manan
Copy link to clipboard
Copied
Yup! My bad!
Hi @Manan Joshi @Kasyan Servetsky ,
Here is the modified script,
Copy link to clipboard
Copied
I don't see what was so difficult in this, the error itself clearly mentions what's the problem. The following line
proFiles.push(myDocNameF);
Copy link to clipboard
Copied
Thank you guys,
Found the error and it was 'scriptPreferences.version = 8.0' issue I made it on the code.
After clearing that, now the script works fine.
Thanks @Kasyan Servetsky and @Manan Joshi for the guidance.
-Singaaram