doc.packageForPrint no runs

Explorer ,
Jan 12, 2021

Copy link to clipboard

Copied

Hi all,

 

i wrote an extendscript tha I use in a CEP 6 extension first ; as you know I get migrate my CEP  extensions from 6 to 9th version. So this track code don't run in InDesign 15.

Does anyone have an idea about this ?

 

thanks

 

Americo

 

///// here is the code

function pacKage(arg) {
    var parentFolder = "/" + arg.share + arg.pkg + arg.id + "_" + arg.number;
    var getFabFolder = parentFolder + "/PRIS";
 
if ( !createFolderIfNotExist(parentFolder) ) {
    alert("Erreur de création du dossier " + parentFolder + ", sortie...");
   exit(0);
}
 
if ( !createFolderIfNotExist(getFabFolder) ) {
    alert("Erreur de création du dossier " + getFabFolder + ", sortie...");
    exit(0);
}

var targetFolder = new Folder (parentFolder + '/' + arg.name);
alert('[opensession.jsx] - targetFolder : ' + targetFolder);

if ( !createFolderIfNotExist(targetFolder) ) {
    alert("Erreur de création du dossier " + targetFolder + ", sortie...");
    exit(0);
} else {
var doc = app.activeDocument;
 
doc.packageForPrint (
    to = targetFolder,
    copyingFonts = false,
    copyingLinkedGraphics = true,
    copyingProfiles = true,
    updatingGraphics = true,
    includingHiddenLayers = true,
    ignorePreflightErrors = true, // (Si false et qu'il y a des erreurs preflight, le script ne fait rien.)
    creatingReport = false,
    includeIdml = false,
    includePdf = true,
    forceSave = true
)
 
}

}

///// what wrong ?

TOPICS
Scripting

Views

38

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

doc.packageForPrint no runs

Explorer ,
Jan 12, 2021

Copy link to clipboard

Copied

Hi all,

 

i wrote an extendscript tha I use in a CEP 6 extension first ; as you know I get migrate my CEP  extensions from 6 to 9th version. So this track code don't run in InDesign 15.

Does anyone have an idea about this ?

 

thanks

 

Americo

 

///// here is the code

function pacKage(arg) {
    var parentFolder = "/" + arg.share + arg.pkg + arg.id + "_" + arg.number;
    var getFabFolder = parentFolder + "/PRIS";
 
if ( !createFolderIfNotExist(parentFolder) ) {
    alert("Erreur de création du dossier " + parentFolder + ", sortie...");
   exit(0);
}
 
if ( !createFolderIfNotExist(getFabFolder) ) {
    alert("Erreur de création du dossier " + getFabFolder + ", sortie...");
    exit(0);
}

var targetFolder = new Folder (parentFolder + '/' + arg.name);
alert('[opensession.jsx] - targetFolder : ' + targetFolder);

if ( !createFolderIfNotExist(targetFolder) ) {
    alert("Erreur de création du dossier " + targetFolder + ", sortie...");
    exit(0);
} else {
var doc = app.activeDocument;
 
doc.packageForPrint (
    to = targetFolder,
    copyingFonts = false,
    copyingLinkedGraphics = true,
    copyingProfiles = true,
    updatingGraphics = true,
    includingHiddenLayers = true,
    ignorePreflightErrors = true, // (Si false et qu'il y a des erreurs preflight, le script ne fait rien.)
    creatingReport = false,
    includeIdml = false,
    includePdf = true,
    forceSave = true
)
 
}

}

///// what wrong ?

TOPICS
Scripting

Views

39

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jan 12, 2021 0
BarlaeDC LATEST
Adobe Community Professional ,
4 hours ago

Copy link to clipboard

Copied

Hi,

 

I have not run your code but I can't see anything that would cause the issue, unless your arguments are not coming in the way you expect and therefore your output path is not correct? or there has been a change to where you can save? I have not used CEP so can't provide much guindance there.

 

Malcolm

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
4 hours ago 0