Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Calculating is wrong if file is opened in a browser

New Here ,
Nov 13, 2024 Nov 13, 2024

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)

TOPICS
General troubleshooting , PDF and browsers , PDF forms , Security digital signatures and esignatures
563
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advisor , Nov 13, 2024 Nov 13, 2024

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

...
Translate
Advisor ,
Nov 13, 2024 Nov 13, 2024

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 14, 2024 Nov 14, 2024
LATEST

Thanks!
I changed the fixed value to 3.79 plus set the format to the same - now it works in both browser and Adobe. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines