Copy link to clipboard
Copied
I have made a simple file, that is used to calculate.
I haven't used javascript in it.
My file works perfect when i test it.
It works perfect when emaild to a coworker.
BUT when launched on a website, the calculation suddenly multiplies by 1.000.
There are 5 fiels named 'Antal km - høj Sats 0/1...'
The fileds are summed up ind another field called 'Antal km i alt - Høj sats' (this works all right)
Another field has a fixed value - field name = 'Gældende Høj sats'
The last field should multipli the Antal km i alt - Høj sats' with 'Gældende Høj sats' - but in the browseer the result is way too big.
*****
Another issue:
The field for signatures disappears when shared on the website.
Why does it do that?
Attached is the two files - the one I made: 'Kørselsregnskab ver. 4.0'
And the one, opened in a browser and then saved with the failiure in it: 'Kørselsregnskab ver. 4.0 fra web'
(Sorry for all the danish letteres in my field names and file names)
It's not a matter of "sharing on a web site", it's a matter of using a browser to fill in the form.
I used Chrome and could reproduce the issue by simply opening your original PDF in the browser and filling in some numbers.
It looks like the Javascript implementation in the browser does not interpret the comma in the fixed value fields as decimal separator but as a digit zero. Thus, the 100,0 times 3,79 in your "Kørselsregnskab ver. 4.0 fra web.pdf" file results in 100 * 3079 = 307.900,00.
On the
...Copy link to clipboard
Copied
It's not a matter of "sharing on a web site", it's a matter of using a browser to fill in the form.
I used Chrome and could reproduce the issue by simply opening your original PDF in the browser and filling in some numbers.
It looks like the Javascript implementation in the browser does not interpret the comma in the fixed value fields as decimal separator but as a digit zero. Thus, the 100,0 times 3,79 in your "Kørselsregnskab ver. 4.0 fra web.pdf" file results in 100 * 3079 = 307.900,00.
On the other hand, when I patch the values of those fixed value fields in your PDF to contain a dot instead of a comma, the calculation works.
Thus, you need to convince Chrome and friends to accept the comma as decimal separator. Maybe someone else here knows a way to do that.
By the way, the issue already starts before, if you enter 1,0 in a "Antal km - høj Sats" field in Chrome, you'll see below that Chrome interprets that as a 100.
Concerning your other question "The field for signatures disappears when shared on the website. Why does it do that?" - your signature fields don't have any signature visualization yet, so the browser displays what's there: nothing! And as the browser does not support digital signatures in PDFs, you can not select or otherwise use that field in the browser either.
Copy link to clipboard
Copied
Thanks!
I changed the fixed value to 3.79 plus set the format to the same - now it works in both browser and Adobe.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now