abracadabraPDF › Forums › PDF – Général › Aplatir certains champs › Répondre à : Aplatir certains champs
Merci… Si j’integre ton code pour aplatir seulement les champs bouton. J’ai une erreur. À la ligne 17.
TypeError: this.getField(…) is null
17:Console:Exec
Tu as une idée… J’essai de récupérer le code d’AcrobatUsers pour aplatir tout les boutons.
for (var i=0; i
if (leChamp.type==”button”) list.push(leChamp);
}
var fields = new Array;
for (var i = 0; i < this.numFields; i++) {
fields = [
this.getNthFieldName(i),
this.getField(this.getNthFieldName(i)).display
];
this.getField(fields[0]).display = display.noPrint;
}
for (var i = 0; i < list.length; i++) {
this.getField(list).display = display.visible;
}
this.flattenPages({
nStart: 0,
nEnd: this.numPages – 1,
nNonPrint: 1,
});
for (var i = 0; i < this.numFields; i++) {
for (var j = 0; j < fields.length; j++) {
if (fields[j][0] == this.getNthFieldName(i)) {
this.getField(this.getNthFieldName(i)).display = fields[j][1];
}
}
}