Copy link to clipboard
Copied
I have a simple Javascript that calculates the number of checked checkboxes. But after saving the file all javascripts are lost. I tried to lock, did not use the previews and did many other actions and nothing helps. What I do wrong?
UPD. Thank you all. I cancelled my plan on Adobe, because as I can understand, none can help me and technical support on Adobe does not work for non-standart cases. I will try to do my project with other tools.
Copy link to clipboard
Copied
Hi,
Can you confirm the version of the software and operating system you are using?
Also, can you indicate were you are saving this document? It is possible that some protection service, like an antivirus, is trying to keep your PDFs 'clean' as it might feel your additional code could be malicious.
Copy link to clipboard
Copied
Thank you for the reply!
I think I have the latest version of the Acrobat DC
Architecture: x86_64
Build: 20.6.20042.371807
AGM: 4.30.98
CoolType: 5.14.5
JP2K: 1.2.2.45402
My OS is macOS mojave 10.14.5 and I'm trying to save in the Documents folder. I have no antivirus as I know...
I'm on my free tryal week before the buying the SW, cuold it be the root of the problem?
Copy link to clipboard
Copied
What code does you use?
Copy link to clipboard
Copied
var nSum = 0;
var aCkFlds = this.getField("CheckBox1").getArray();
for(var i=0;i<aCkFlds.length;i++){
if(aCkFlds[i].isBoxChecked(0))nSum++;
}
event.value = nSum;
Copy link to clipboard
Copied
Acrobat DC on Windows doesn't remove the code.
Copy link to clipboard
Copied
Same for my developer computer, but the saved file still does not work on smartphones and macs
Copy link to clipboard
Copied
How are you saving it, exactly? It should not cause any code to be removed.
Copy link to clipboard
Copied
Just in very ordinary way, Save-as
I'd made the short screen video, all the interface is in Russian, but all functions are the same
Copy link to clipboard
Copied
Try this:
Delete the field and re-create the field with the script.
Copy link to clipboard
Copied
Does not work.
Copy link to clipboard
Copied
It does not work
Copy link to clipboard
Copied
Where in the video does you save the filled form?
Copy link to clipboard
Copied
File - Save As - Choose the folder - Save
and tryed another way
File - Save as Other - Reader Extended PDF - Enable more tools (incl form fill-in and save) - Save now - Save
Copy link to clipboard
Copied
Don't fill the form in Apple Preview, it will damage the form.
Copy link to clipboard
Copied
I have read your answer on the same topic. If I dont use any previews and even open the file after saving, it looses scripts anyway.
Copy link to clipboard
Copied
You're exporting the PDF to another PDF using the Adobe PDF virtual printer... That is like sending it to an actual printer, so of course all the fields, scripts, etc. will be gone. Why are you doing that?
Copy link to clipboard
Copied
How to do it right, that is the question 😉
This way does not help too
Is there another way to make pdf form with scripts?