Question
script no longer works in indesign 2023
Hi all,
this is an essential script (from abracadabraPDF.net) which i'm using for years, until now.....
after the indesign update 2023 the script doesn't do anything anymore :-((
Would be great if someone could debug this:
myDoc = app.activeDocument;
if( myDoc.selection.length == 0 ){err("PDFoptions editor - offert par abracadabraPDF.net\r\r\rThere's no selection!\r\rIl n'y a pas de s\u00E9lection active !");}
if( myDoc.selection[0].constructor.name != "PDF" ){
//Teste si selection existante
try {
if (myDoc.selection[0].contentType == ContentType.graphicType){
//Teste si contenu est PDF ou non
try {
if (myDoc.selection[0].allGraphics[0].constructor.name == "PDF"){
placePDF(myDoc.selection[0].allGraphics[0]);
} else {
err("PDFoptions editor - offert par abracadabraPDF.net\r\r\rNo PDF content embedded.\r\rIl n'y a pas de PDF incorpor\u00E9.");
}
} catch (e){
err("PDFoptions editor - offert par abracadabraPDF.net\r\r\rNo PDF content embedded.\r\rIl n'y a pas de PDF incorpor\u00E9.");
}
} else {
err("PDFoptions editor - offert par abracadabraPDF.net\r\r\rSelect an imported PDF content.\r\rS\u00E9lectionnez un objet contenant un PDF import\u00E9.");
}
} catch (e){
err("PDFoptions editor - offert par abracadabraPDF.net\r\r\rSelect an imported PDF content.\r\rS\u00E9lectionnez un objet contenant un PDF import\u00E9.");
}
} else {
placePDF(myDoc.selection[0]);
}
exit();
function placePDF(n){
try {
//versions ulterieuresà CS4
myDoc.selection[0].place(n.itemLink.filePath,1, undefined);
} catch (e){
//err("Unknown error!");
}
}
function err(e){
alert(e);
exit();
}
