• Test PDF XFA forms + javascript [Was:Re: How to get rid of the "Make Ad

    From Carlos E.R.@21:1/5 to Paul on Tue Jul 1 22:05:46 2025
    XPost: alt.comp.os.windows-11

    On 2025-07-01 18:09, Paul wrote:
    On Tue, 7/1/2025 8:37 AM, Carlos E.R. wrote:


    What Firefox doesn't do is forms with javascript code. The only software I know that does them are Adobe's. There may be some other Windows software that does it in Windows (I don't know which), and none on Linux.

    https://support.mozilla.org/en-US/questions/1333222

    about:config

    pdfjs.enableScripting BOOLEAN True <=== Javascript-inside-a-PDF support

    It is enabled (by default).

    Interesting! This is news to me.


    The PDF reader module may itself be written in Javascript, but
    there is also interpretation of Javascript within the body
    of a PDF file, which is also supported. The name of the code
    module is "pdfjs" but in the documents themselves, the
    Javascript in there can be supported.

    Even if you use "mutool" and decompress a PDF with Javascript inside,
    the code is still not recognizable to the eye. Which is an
    unfortunate design choice, whoever did it that way.

    *******

    In any case, you should re-test Firefox or Chrome, and see
    what the latest interpreter is capable of. The above configuration
    setting hints at capabilities that are present.

    Ok, trying.


    (Following my own notes from 2024-01-17). You can test it with:

    <https://www.fema.gov/flood-insurance/find-form/policyholders>

    then search for "Proof of Loss - Building & Contents" and click
    "Download Document" in that paragraph.

    I have it downloaded years ago as fema_fi-proof-of-loss-building-and-contents-policyholder-prepared-form-ff-206-fy-21-108.pdf

    Search for "amount claimed". Fill in the two boxes prior to it. The
    third box should have the total.

    It does not.



    Notes from 2024-01-18

    <https://www.pdfscripting.com/public/Free-Sample-PDF-Files-with-scripts.cfm>

    This link has sample PDFs you can try. Some work in my FF (SimpleFormCalculations.pdf), most don't or do so partially
    (JSPopupCalendar).




    --
    Cheers, Carlos.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul@21:1/5 to Carlos E.R. on Tue Jul 1 20:00:59 2025
    XPost: alt.comp.os.windows-11

    On Tue, 7/1/2025 4:05 PM, Carlos E.R. wrote:
    On 2025-07-01 18:09, Paul wrote:
    On Tue, 7/1/2025 8:37 AM, Carlos E.R. wrote:


    What Firefox doesn't do is forms with javascript code. The only software I know that does them are Adobe's. There may be some other Windows software that does it in Windows (I don't know which), and none on Linux.

    https://support.mozilla.org/en-US/questions/1333222

        about:config

          pdfjs.enableScripting   BOOLEAN   True    <=== Javascript-inside-a-PDF  support

    It is enabled (by default).

    Interesting! This is news to me.


    The PDF reader module may itself be written in Javascript, but
    there is also interpretation of Javascript within the body
    of a PDF file, which is also supported. The name of the code
    module is "pdfjs" but in the documents themselves, the
    Javascript in there can be supported.

    Even if you use "mutool" and decompress a PDF with Javascript inside,
    the code is still not recognizable to the eye. Which is an
    unfortunate design choice, whoever did it that way.

    *******

    In any case, you should re-test Firefox or Chrome, and see
    what the latest interpreter is capable of. The above configuration
    setting hints at capabilities that are present.

    Ok, trying.


    (Following my own notes from  2024-01-17). You can test it with:

    <https://www.fema.gov/flood-insurance/find-form/policyholders>

    then search for "Proof of Loss - Building & Contents" and click "Download Document" in that paragraph.

    I have it downloaded years ago as fema_fi-proof-of-loss-building-and-contents-policyholder-prepared-form-ff-206-fy-21-108.pdf

    Search for "amount claimed". Fill in the two boxes prior to it. The third box should have the total.

    It does not.



    Notes from 2024-01-18

    <https://www.pdfscripting.com/public/Free-Sample-PDF-Files-with-scripts.cfm>

    This link has sample PDFs you can try. Some work in my FF (SimpleFormCalculations.pdf), most don't or do so partially (JSPopupCalendar).


    Yes, weird behavior. "Partially working", which is the same as
    "not fit for purpose". The output calculation is twisted 90 degrees.

    [Picture]

    https://i.postimg.cc/fyzvRDhP/FF136-Conditional-Calc-Scripts-pdf.gif

    Paul

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Carlos E.R.@21:1/5 to Paul on Wed Jul 2 02:50:11 2025
    XPost: alt.comp.os.windows-11

    On 2025-07-02 02:00, Paul wrote:
    On Tue, 7/1/2025 4:05 PM, Carlos E.R. wrote:
    On 2025-07-01 18:09, Paul wrote:
    On Tue, 7/1/2025 8:37 AM, Carlos E.R. wrote:


    What Firefox doesn't do is forms with javascript code. The only software I know that does them are Adobe's. There may be some other Windows software that does it in Windows (I don't know which), and none on Linux.

    https://support.mozilla.org/en-US/questions/1333222

    ...

    Notes from 2024-01-18

    <https://www.pdfscripting.com/public/Free-Sample-PDF-Files-with-scripts.cfm> >>
    This link has sample PDFs you can try. Some work in my FF (SimpleFormCalculations.pdf), most don't or do so partially (JSPopupCalendar).


    Yes, weird behavior. "Partially working", which is the same as
    "not fit for purpose". The output calculation is twisted 90 degrees.

    [Picture]

    https://i.postimg.cc/fyzvRDhP/FF136-Conditional-Calc-Scripts-pdf.gif

    Paul

    Wow! I did not try that one. Weird!

    So, support started with version 90. I have 128 ESR. So, maybe in five
    years more?

    I recogn it is a difficult target, adobe doesn't have a track record of adhering to standards. Maybe this is not even a published standard.


    --
    Cheers, Carlos.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul@21:1/5 to Carlos E.R. on Wed Jul 2 01:48:54 2025
    XPost: alt.comp.os.windows-11

    On Tue, 7/1/2025 8:50 PM, Carlos E.R. wrote:
    On 2025-07-02 02:00, Paul wrote:
    On Tue, 7/1/2025 4:05 PM, Carlos E.R. wrote:
    On 2025-07-01 18:09, Paul wrote:
    On Tue, 7/1/2025 8:37 AM, Carlos E.R. wrote:


    What Firefox doesn't do is forms with javascript code. The only software I know that does them are Adobe's. There may be some other Windows software that does it in Windows (I don't know which), and none on Linux.

    https://support.mozilla.org/en-US/questions/1333222

    ...

    Notes from 2024-01-18

    <https://www.pdfscripting.com/public/Free-Sample-PDF-Files-with-scripts.cfm>

    This link has sample PDFs you can try. Some work in my FF (SimpleFormCalculations.pdf), most don't or do so partially (JSPopupCalendar).


    Yes, weird behavior. "Partially working", which is the same as
    "not fit for purpose". The output calculation is twisted 90 degrees.

         [Picture]

          https://i.postimg.cc/fyzvRDhP/FF136-Conditional-Calc-Scripts-pdf.gif

       Paul

    Wow! I did not try that one. Weird!

    So, support started with version 90. I have 128 ESR. So, maybe in five years more?

    I recogn it is a difficult target, adobe doesn't have a track record of adhering to standards. Maybe this is not even a published standard.



    I tried Acrobat Reader on the ConditionalCalcScripts and it works.

    [Picture]

    https://i.postimg.cc/BQrptNz5/Acro-Read-Conditional-Calc-Scripts.gif

    That shows how far off Firefox is for this.

    *******

    I installed

    Name: AcroRdrDCx642500120531_MUI.exe
    Size: 733004184 bytes (699 MiB)
    SHA256: 1D360E84BEA704D157846EFA3D197CEAE38646E9690CB211885F1F47791BF7D8

    in a Win10 VM.

    In the upper left Menu hamburger, the General choice, down near the
    bottom, has three tick boxes that could affect the number of "challenges" delivered to the user. But the program still screws around like it
    was Talky Toaster, annoying the hell out of me.

    And every time it updates itself, you know what's going to happen to
    those tick boxes :-/

    I guess when you're Adobe, you just can't have few enough customers,
    but, you'll keep trying.

    Paul

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Carlos E.R.@21:1/5 to Paul on Wed Jul 2 12:58:59 2025
    XPost: alt.comp.os.windows-11

    On 2025-07-02 07:48, Paul wrote:
    On Tue, 7/1/2025 8:50 PM, Carlos E.R. wrote:
    On 2025-07-02 02:00, Paul wrote:
    On Tue, 7/1/2025 4:05 PM, Carlos E.R. wrote:
    On 2025-07-01 18:09, Paul wrote:
    On Tue, 7/1/2025 8:37 AM, Carlos E.R. wrote:


    What Firefox doesn't do is forms with javascript code. The only software I know that does them are Adobe's. There may be some other Windows software that does it in Windows (I don't know which), and none on Linux.

    https://support.mozilla.org/en-US/questions/1333222

    ...

    Notes from 2024-01-18

    <https://www.pdfscripting.com/public/Free-Sample-PDF-Files-with-scripts.cfm>

    This link has sample PDFs you can try. Some work in my FF (SimpleFormCalculations.pdf), most don't or do so partially (JSPopupCalendar).


    Yes, weird behavior. "Partially working", which is the same as
    "not fit for purpose". The output calculation is twisted 90 degrees.

         [Picture]

          https://i.postimg.cc/fyzvRDhP/FF136-Conditional-Calc-Scripts-pdf.gif

       Paul

    Wow! I did not try that one. Weird!

    So, support started with version 90. I have 128 ESR. So, maybe in five years more?

    I recogn it is a difficult target, adobe doesn't have a track record of adhering to standards. Maybe this is not even a published standard.



    I tried Acrobat Reader on the ConditionalCalcScripts and it works.

    [Picture]

    https://i.postimg.cc/BQrptNz5/Acro-Read-Conditional-Calc-Scripts.gif

    That shows how far off Firefox is for this.

    Yep.


    *******

    I installed

    Name: AcroRdrDCx642500120531_MUI.exe
    Size: 733004184 bytes (699 MiB)
    SHA256: 1D360E84BEA704D157846EFA3D197CEAE38646E9690CB211885F1F47791BF7D8

    in a Win10 VM.

    In the upper left Menu hamburger, the General choice, down near the
    bottom, has three tick boxes that could affect the number of "challenges" delivered to the user. But the program still screws around like it
    was Talky Toaster, annoying the hell out of me.

    And every time it updates itself, you know what's going to happen to
    those tick boxes :-/

    I guess when you're Adobe, you just can't have few enough customers,
    but, you'll keep trying.

    Yes, they do.

    --
    Cheers, Carlos.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)