Hi Community,
I am working on my ODC project where I have implemented UltimatePDF.
I am trying to print multiple pages inside the printscreen. For this, I used the client action ScreenToPDFOnInitialize along with the system event. Inside the event, I also called OnApplicationReady_UltimatePDF, but the PDF is not downloading any data.
I tried another approach as well — inside the data action I called the server action PrintToPDF and passed the correct URL. I debugged and verified that the URL is correct, but the action does not return any binary data. Instead, it always returns a 0 KB PDF file.
Has anyone faced this issue before? Am I missing some configuration or a specific step for generating PDFs with UltimatePDF in ODC?
Thanks in advance
Hi @Himanshu dwivedi ,
This behavior is expected in ODC because UltimatePDF relies on the underlying browser rendering and session context, which differs from traditional O11 runtime. When you use ScreenToPDFOnInitialize or PrintToPDF, the screen might not be fully rendered or accessible through the provided URL at the time the action executes, resulting in a blank or 0 KB PDF.
Make sure you trigger the PrintToPDF or ScreenToPDFOnInitialize action after the screen has completely loaded (for example, from a button click or after a short delay, not directly on OnInitialize).
Always pass a fully qualified absolute URL (including domain), since relative URLs may fail in ODC.
If using data actions, ensure all asynchronous data is loaded before generating the PDF.
You don’t need to call OnApplicationReady_UltimatePDF manually in ODC — it’s initialized automatically on startup. If you still get an empty file, test the same logic in a simple screen with static content first. Once that works, apply the same pattern to your dynamic screen.