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.
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:
Hi @PatrickMast , I can't seem to get this to work. Could you share an example of where you've gotten this to work? The syntax you provided is not recognised, I have attemped other syntaxes that are recognised but just simply do not "read"
Any update on this yet?
We are using the downloadAsPDf but the resolution/size cannot be controlled at all. WE have to advise our users to use another tool to get the created pdf correct and it's not a good Ux
Better PDF integration is on our road map and the eng team is working on a major overhaul to get a bunch of PDF supporting features and components up and running.
I will add your plus 1 to the ticket and post any updates here!