[Ultimate PDF] (REACTIVE) Is it possible to prevent a PDF creation to ensure all data is loaded
Reactive icon
Forge component by Leonardo Fernandes
Application Type

When debugging some weird behavior we suspect that the "snapshot" of the page is done while the page didn't fetched all the data.

We use a reactive application to render the pages. To make sure this isn't a problem we are in doubt to recreate the pages into a traditional application.

Before we do that. Can anyone tell me if the logic of PDF Creator is aware of open connections (and wait for it to finish and render). In the extension I also noticed a wait on a specific class ".ultimate-pdf-is-not-ready". Can we use that to steer the moment of making the PDF?

Hi Peter,

"By default, Ultimate PDF waits for network activity to cease before capturing the screen, which should be enough for most use cases, even if data is being fetched asynchronously." - quote retrieved from the WaitUntilReadyBeforeCapturing client action.

That said, what may be happing is that you could be presenting a lot of data and that is taking a long time to be presented in the DOM and I'm not sure but I don't think the extension is capable of waiting for that.

I would say, if what you have in reactive isn't too painful to convert to traditional go for it, I think it could possibly save you some problems.

Since you already have the page in reactive, you could try these two actions, IsReadyForCapture and WaitUntilReadyBeforeCapturing they are in the client actions folder AsyncScreens. Just use the wait action on the OnInitialize of your screen and then the trick is when to call the Ready action, maybe wait for an element to exist using promises or the window load events for exemple, not sure. 

Hope it helps,


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.