abracadabraPDF › Forums › PDF – Général › ACROBAT : Pages affichées ou non › Répondre à : ACROBAT : Pages affichées ou non
Le script est copié sur celui que vous m’aviez donné :
// supprimer toutes les pages sauf la première
if (this.numPages > 1) {this.deletePages({nStart: 1, nEnd: this.numPages-1});}
// affichage des pages
if (this.getField(“case.0”).isBoxChecked(0)) {
this.getTemplate(“page0”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
this.getTemplate(“page1”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
this.getTemplate(“page2”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
}
if (this.getField(“case.1”).isBoxChecked(0)) {
this.getTemplate(“page3”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
this.getTemplate(“page4”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
this.getTemplate(“page5”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
this.getTemplate(“page6”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
}
if (this.getField(“case.2”).isBoxChecked(0)) {
this.getTemplate(“page7”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
this.getTemplate(“page8”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
this.getTemplate(“page9”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
}
if (this.getField(“case.3”).isBoxChecked(0)) {
this.getTemplate(“page10”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
this.getTemplate(“page11”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
this.getTemplate(“page12”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
this.getTemplate(“page13”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
}
if (this.getField(“case.4”).isBoxChecked(0)) {
this.getTemplate(“page14”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
this.getTemplate(“page15”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
this.getTemplate(“page16”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
this.getTemplate(“page17”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
}
if (this.getField(“case.5”).isBoxChecked(0)) {
this.getTemplate(“page18”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
this.getTemplate(“page19”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
this.getTemplate(“page20”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
this.getTemplate(“page21”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
}
if (this.getField(“case.6”).isBoxChecked(0)) {
this.getTemplate(“page22”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
this.getTemplate(“page23”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
this.getTemplate(“page24”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
this.getTemplate(“page25”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
}
if (this.getField(“case.7”).isBoxChecked(0)) {
this.getTemplate(“page26”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
this.getTemplate(“page27”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
this.getTemplate(“page28”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
this.getTemplate(“page29”).spawn({nPage: this.numPages, bRename: false, bOverlay: false});
}
// retour à la première page
this.pageNum = 0;
Il fonctionne parfaitement, sauf avec Acrobat Reader qui met une alerte, et qui me permet même pas de cocher les cases.