Ver Mensaje Individual
  #3 (permalink)  
Antiguo 28/02/2005, 07:16
Dohcan
 
Fecha de Ingreso: octubre-2003
Mensajes: 12
Antigüedad: 21 años, 3 meses
Puntos: 0
Muchas gracias por tu amable atención Ángel. Pero una cosa más. El código siguiente inserta la ruta entera al fichero (path). Para que inserte únicamente el nombre del fichero, ¿qué variable habría que cambiar?
/* Put file name on all pages and print selected files 8.5 X 11 inch */
var inch = 72;
for (var p = 0; p < this.numPages; p++) { // place on every page of PDF file
// position rectangle (assume 8.5 inch by 11 inch paper portrait orientation
var aRect = this.getPageBox( {nPage: p} );
aRect[0] += 0.25*inch; // in from upper left hand edge of page.
aRect[2] = aRect[0]+ 8.0*inch; // inch wide
aRect[1] -= 10.6*inch; // down from upper left hand corner of page
aRect[3] = aRect[1] - 12; // and points high
// now construct field cName:
var fAdd = this.addField({cName:"zzzFileName", cFieldType:"text", nPageNum:p, oCoords:aRect})
fAdd.delay = true;
fAdd.borderStyle = border.s; // border style
fAdd.textSize = 0; // font size
fAdd.textColor = color.black; // font color
fAdd.textFont = "Helvetica"; // font type
fAdd.delay = false
var fAdd = this.getField("zzzFileName");
fAdd.alignment = "center"; // center field value
fAdd.value = this.path; // file name for all versions
// if (app.viewerVersion >= 5) fAdd.value = this.URL; // version 5 & above
// if (app.viewerVersion >= 6) fAdd.value = this.documentFileName; // version 6 & above
}
this.print();

Gracias de nuevo y un saludo,
Dohcan