swiftpdfadobeacrobatfillable

Mathematical Calculations Not Working in Fillable PDF Forms


As a mobile application developer working on a project that involves fillable PDF forms with automated calculations, I'm facing two queries that I need assistance with:

  1. The automated calculation feature works perfectly in Chrome browsers, but when I try it in Safari, the calculations do not function, and I have to manually enter the values.

  2. When opening the fillable PDF forms in PDFKit or WebView on Apple mobile devices for my project, the calculations also do not work, and manual entry of values is required.

I have attached a video file demonstrating the first query for your reference.

Ultimately, my concern is finding a solution to enable mathematical calculations in fillable PDF forms for iOS devices and Safari browsers. Any guidance or assistance in achieving this functionality would be highly appreciated.


Solution

  • Ultimately, my concern is finding a solution to enable mathematical calculations in fillable PDF forms for iOS devices and Safari browsers.

    You can't. The Safari PDF viewer can't process JavaScript in PDF files.

    Unfortunately, the only way to control the PDF experience is to control the PDF viewer. Unless you can embed Chromium in your app or enforce the use of Chrome, you'll probably need to license a PDF viewer that is capable of running JavaScript.