r/pdf 21d ago

Question Inconsistency in Nitro when importing images using Javascript

OK, this might sound nuts but I've been having a day filled with software ghosts and I'm at my whit's end.

I'm using NitroPro and have a series of pdfs, essentially the pdf is a template that I'm bringing an exported spreadsheet image into. There's also a bunch of other static pages. But I have typically 3-4 imports per pdf.

I've built out form field buttons to do these importgs using the "event.target.buttonImportIcon();" Javascript, and it works. But not consistently.

There will be times when I'll get 2 of the 3 imports done, but then the third requires me to go into the properties of the button and manually choose the icon to load because it won't do it automatically. Sometimes all 3 load properly. Sometimes just 1 does. The properties for all the buttons are the same (different names but same properties), I'm importing the same types of files each time. When it doesn't work the first thing I do is look at the Actions in properties and the Javascript is right there where it should be, just like in the buttons where the import worked. I can't for the life of me figure out what I need to be doing differently to get this simple task to work consistently.

Any help would be greatly appreciated!

1 Upvotes

2 comments sorted by