Hi Guys,
I'm using Ultimate PDF to download.
In my case, due to business needs, I created a screen with the data that will be used for the download.
However, I have some expressions within this screen in which I tried to assign client variables, but when I use the components below I pass the url of this screen but it does not render in the PDF, it comes with a blank field.
Below is the PDF model on the screen using the PrintLayout component:
Image of the structure I want to download on the screen:
in the download flow where I pass the url and where it returns a binary
In this case I use client variables in the expressions within the empty fields on the screen but it returns blank, I checked the debug and it is filling in the client variables but it just doesn't render in the image.
The PDF after download.
Hi Fabiano,
The page you see when you open the screen in your own browser is not directly converted to PDF by Ultimate PDF. Instead, the PrintToPDF server action will open a separate instance of the screen using Chromium and convert that into PDF. Since this process happens server-side, the screen won't have access to the value of the client variable, as that is only stored client-side (hence the name), so in your browser.
So for this to work, you'll need to find another way to pass that variable to the screen (in a way that makes it available for server-side use), for example through the page url or by first storing it in the database and then retrieving it using an aggregate.