Hi, I am creating a fillable PDF document that runs JavaScript to run some calculations, this Javascript makes avast detect a
Js:Pdfka-gen[expl] virus on the PDF document.
The Javascript is this one:
var itemNum = [1,2,3];
itemNum[1] = 2.1;
itemNum[2] = 2.2;
itemNum[3] = 2.3;
itemNum[4] = 2.4;
itemNum[5] = 2.5;
itemNum[6] = 2.6;
itemNum[7] = 2.7;
itemNum[8] = 2.8;
itemNum[9] = 2.9;
itemNum[10] = 2.10;
itemNum[11] = 2.11;
itemNum[12] = 2.12;
itemNum[13] = 2.13;
itemNum[14] = 2.14;
itemNum[15] = 2.15;
itemNum[16] = 2.16;
itemNum[17] = 2.17;
itemNum[18] = 2.18;
itemNum[19] = 2.19;
itemNum[20] = 2.20;
itemNum[21] = 2.21;
itemNum[22] = 2.22;
itemNum[23] = 2.23;
itemNum[24] = 2.24;
itemNum[25] = 2.25;
itemNum[26] = 2.26;
itemNum[27] = 2.27;
itemNum[28] = 3.1;
itemNum[29] = 3.2;
itemNum[30] = 3.3;
itemNum[31] = 3.4;
itemNum[32] = 3.5;
itemNum[33] = 3.6;
itemNum[34] = 3.7;
itemNum[35] = 3.8;
itemNum[36] = 3.9;
itemNum[37] = 3.10;
itemNum[38] = 3.11;
itemNum[39] = 3.12;
itemNum[40] = 3.13;
itemNum[41] = 3.14;
itemNum[42] = 3.14;
itemNum[43] = 4.1;
itemNum[44] = 4.2;
itemNum[45] = 4.3;
itemNum[46] = 4.4;
itemNum[47] = 5.1;
itemNum[48] = 5.2;
itemNum[49] = 5.3;
itemNum[50] = 5.4;
itemNum[51] = 6.1;
itemNum[52] = 6.2;
itemNum[53] = 6.3;
itemNum[54] = 7.1;
itemNum[55] = 7.2;
itemNum[56] = 8.1;
itemNum[57] = 8.2;
itemNum[58] = 8.3;
itemNum[59] = 8.4;
itemNum[60] = 8.5;
itemNum[61] = 8.6;
itemNum[62] = 8.7;
itemNum[63] = 8.8;
itemNum[64] = 8.9;
itemNum[65] = 8.10;
itemNum[66] = 8.11;
itemNum[67] = 8.12;
itemNum[68] = 8.13;
itemNum[69] = 8.14;
itemNum[70] = 8.15;
itemNum[71] = 8.16;
itemNum[72] = 8.17;
itemNum[73] = 8.18;
itemNum[74] = 8.19;
itemNum[75] = 8.20;
itemNum[76] = 8.21;
itemNum[77] = 8.22;
itemNum[78] = 8.23;
itemNum[79] = 8.24;
itemNum[80] = 8.25;
itemNum[81] = 8.26;
itemNum[82] = 8.27;
itemNum[83] = 8.28;
itemNum[84] = 10.1;
itemNum[85] = 10.2;
var arrayLength = 85;
bData = null;
cData = null;
eData = null;
dData = null;
nData = null;
mData = null;
var bData = [];
var cData = [];
var eData = [];
var dData = [];
var nData = [];
var mData = [];
var nText = ["","Werkzaamheden stoppen", "Directe verbeteringen vereist", "Maatregelen vereist", "Aandacht vereist", "Geen actie"];
var eField;
var eVal;
var nVal;
for (eField = 1; eField <= arrayLength ; eField++) {
if(this.getField("A" + eField).value == "" || this.getField("B" + eField).value == "" || this.getField("C" + eField).value == "") {
this.getField("E" + eField).value = "";
this.getField("F" + eField).value = "";
this.getField("G" + eField).value = "";
}else {
eVal = this.getField("A" + eField).value * this.getField("B" + eField).value * this.getField("C" + eField).value;
this.getField("E" + eField).value = eVal;
if(eVal <= 20){nVal = 5;}
if(eVal > 20 && eVal <= 70){nVal = 4;}
if(eVal > 70 && eVal <= 200){nVal = 3;}
if(eVal > 200 && eVal <= 400){nVal = 2;}
if(eVal > 400) { nVal = 1; }
this.getField("F" + eField).value = nVal;
this.getField("G" + eField).value = nText[nVal];
}
}
var n = 1;
n = 1;
for (var dd = 1; dd <= arrayLength ; dd++){
bData[dd] = this.getField("F" + dd).value;
nData[dd] = this.getField("Notes" + dd).value;
if (bData[dd] != "" && bData[dd] != 5){
cData[n] = bData[dd];
mData[n] = nData[dd];
eData[n] = itemNum[dd];
n ++;
}
}
for (var ee = 1; ee <= arrayLength; ee++){
if (ee < cData.length) {
var tempS = cData[ee];
this.getField("X" + ee).value = nText[tempS] + " (" + cData[ee] + ")\n" + mData[ee];
this.getField("Z" + ee).value = eData[ee];
}else{
this.getField("X" + ee).value = "";
this.getField("Z" + ee).value = "";
}
}
-----------------------------------------------------------------
Please Help!