Score:0

Cannot use JavaScript inside PDF with Firefox

gb flag

I am having troubles using JavaScript in a PDF file opened with Firefox.

To sum up, it is a file that uses XFA forms and JavaScript to validate the form and generate a QrCode. Here is the link to the file: IRCC Form

It just tells me:

JavaScript has been disabled, the form requires JavaScript to validate properly.
Please enable JavaScript through Preferences under the Edit menu and reopen the form.

I checked my about:config in firefox. I have my

pdfjs.disable : false  
pdfjs.enableScripting : true  
javascript.enabled : true

I can fill in the form but the Validate button does nothing. I even tried with Chrome and it doesn't work.

Please help me, I don't want to go back to Windows with Adobe Acrobat Reader. I left that dark past behind me :( ...

Derman avatar
bz flag
Hi @wil123, have you solved the problem? If yes, how?
David avatar
cn flag
Did you search to see if there are any Ubuntu compatible PDF readers?
cn flag
Ray
I've used Ubuntu for many years, but I also use a dual-boot system with Microsoft Windows. Even if you want to put it behind you, sometimes, the people you interact with have not and you have to use it. It has a majority share of the personal computer market; no matter how "dark" you think it is, you/we cannot deny it...
David avatar
cn flag
https://linuxconfig.org/pdf-viewer-list-on-ubuntu-20-04-focal-fossa-linux
gb flag
I tried Okular and Atril, I read online that evince is not compatible with JS but I will try it anyways ...
gb flag
Evince does not even open the file, Okular does not support forms ...
abu-ahmed al-khatiri avatar
in flag
@wil123 did you try to validate them on signature panel?
gb flag
what does that mean, can you develop please ?
abu-ahmed al-khatiri avatar
in flag
@wil123 please check my initial answer
Score:0
in flag

if you don't have Adobe for Ubuntu, you can follow this to install Adobe Reader 9 on i386

wget --progress=dot -O ~/adobe.deb ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.5.5/enu/AdbeRdr9.5.5-1_i386linux_enu.deb
sudo apt install libxml2:i386 libcanberra-gtk-module:i386 gtk2-engines-murrine:i386 libatk-adaptor:i386
sudo dpkg --add-architecture i386
sudo apt update
sudo dpkg -i ~/adobe.deb
acroread /path/file.pdf

to enable JavaScript support follow :

Edit > Preferences > JavaScript > Checkmark Enable Acrobat JavaSript and Checkmark Enable JavaScript Security

and then, to validate the signature follow :

View > Navigation Panels > Click Signatures > on the left panel click Validate All button to accept all certified by IRCC

after you fill the form, click the validate button and it will appears the notification JS like below :

enter image description here

and then, the QRcode should be appears on the last page like below :

enter image description here

Hope this helps.

Derman avatar
bz flag
Hi, I followed exactly the same steps as your suggestion, but the validate part is still not working. I first downloaded the page to local then opened with Adobe Reader as you mentioned. Seems like those dynamic features of the form is gone during downloading. What else can I do to edit it properly?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.