I have been playing with this feature, and was able to scope the export to a single container component, and that is good. The problem is, when I export on my monitor, I get a nice, wide PDF. When my co-worker tries with a smaller screen, they get a much skinnier PDF.
I tried fullscreen
and scale
but can't seem to get deterministic PDF generation.
Hey @khill-fbmc At the moment Retool doesn't provide a method to generate a PDF of an app under set display dimensions, but I have created a feature request for this on your behalf! I'll tag you here if Retool ships this update at some future point.
Hi @khill-fbmc,
The utils.downloadPage
function doesn't render a PDF based on your screen size. The PDF is rendered based on the content of the page you are exporting. If your coworker gets a skinnier PDF, it is likely that their page has less content on it than yours.
One way to ensure that you and your coworker get the same PDF is to use the --window-size
flag when generating the PDF. This flag allows you to specify the width and height of the window that is used to render the PDF. For example, you could use the following command to generate a PDF that is 1000px wide and 800px high:
utils.downloadPage --window-size 1000,800
Hope this helps.
Patrick
1 Like
Hey @PatrickMast I don't think the information you've shared is correct.
The command you shared isn't valid JS and doesn't align with the syntax of the utils.downloadPage method - utils methods | Retool Docs
Can you share any references to documentation or a recording of how you're achieving this within Retool that backs up this information?