Adobe PDF Add Text Javascript to all even pages

Viewed 63

How can I add a text field to all even pages of a pdf document? With the following the text is added only to the second page of the document.

if ( fld = "undefined" ) {
    var f = this.addField("MacroDate", "text", 1, [550,0,50,15]);
    f.delay = true;
    f.alignment = "center";
    f.fillColor = color.transparent;
    f.lineWidth = 0;
    f.strokeColor = color.black;
    f.borderStyle = border.s;
    f.textSize = 8;
    f.textColor = color.black;
    f.textFont = font.Helv;
    f.readonly = false;
    f.multiline = false;
    f.doNotScroll = true;
    f.value = util.printd("dd/mm/yyyy", new Date());
    f.delay = false;
} ```
0 Answers
Related