utils.downloadPage not downloading pdf

I can get utils.downloadPage to work. I have tried the pdf_exporter and that works fine, so I know it is not a pop-up blocker.

My code in JS Query:
utils.downloadPage("test");

No errors generate when I run the code and even get a pop that says "Query2 ran successfully", but no pdf is generated.

Here is the query configuration

Hi @josh.dobson

Thanks for reaching out! I am looking into this. The code, utils.downloadPage("test");, is working in my test app :thinking:

It looks like we have a bug where this doesn't work if there is a stepped container in the app. Is that the case in your app? If so, I'll let you know when we fix that bug. If that isn't what is going on here, let me know, and I'll keep looking into it.

If you are running into this stepped container bug, you should be able to download the rest of the app by excluding that component from the download: utils.downloadPage('test', {componentsToExclude: ['steppedContainer1']} )

My test case is only one single component, a text component with the word "Test" in it. And the javascript query with "utils.downloadPage("test");" and nothing else.

Can we set up a screen share and I can show you?

Josh

I just set up a test account so I could test the functionality outside of my company's environment and it works. So it must be something with the configuration or version at my company. Do you know the requirements to use this utility?

Josh

1 Like

Hey @josh.dobson

That is interesting; there shouldn't really be any requirements as long as you're using this code in a JS query :thinking: Thanks for testing!

It's possible that the issue is specific to the version your company is using. If you can send me the version #, I can do some more testing there. The version info can be found by clicking the ? in the bottom right corner of the Retool editor

I'll send you a private message about setting up a screen share if you're still interested in doing so!

we are on version 2.90.9

Hi @josh.dobson Thank you! I am seeing the same bug on 2.90 :disappointed: Is upgrading to 2.91+ an option? It appears to be working on 2.91

Folks, I had the same problem, and to fix it I added only the containers that I wanted on PDF.

utils.downloadPage("FOLCalculator", { componentsToInclude: ["container9","container8","container10"] });