Hi,
Is it possible that we get the generated PDF as a Binary blob instead of downloading (or showing it) at the client? We want to centrally store the generated PDF at a certain location.
Greetings,
Vincent
Hi Vincent. You can use the PrintToPDF in that scenario as well. You will need to pass it the URL of the screen (and input parameters, if any), e.g. URL = "/Reports/WeeklyReport" would produce a PDF from the screen WeeklyReport of the Reports module.
ScreenToPDF is more suitable for interactive scenarios, for example when a user downloads an invoice. PrintToPDF can be used in any context, for example in a Timer or in a REST API.
As per my understanding ultimatePDF plugin returns the binary of pdf file. You can store or upload this binary in database or any external server as well.
I should have been more clear. We don't use the PrintToPDF action. We use the ScreenToPDF_OnInitialize. That action doesn't have an output.
to share, what i had was similar to Vincent's case above. I am keen to use "ScreenToPDF_OnInitialize " as it allows PDF to be created without the normal website header information.
i managed to generate the PDF via a 2 steps approach
1) continue to use "ScreenToPDF_OnInitialize" and set input parameters Preview and OpenInBrowser to False (As shown below)
2) Apply the normal PRintToPdf and download on the same page.
The only concern i have is if this will severely degrade performance. If anyone knows how to create a new "screen" without the normal webpage header and footer, do let me know (then maybe can just use a single "PrintToPdf" to achieve without using "ScreenToPDF_OnInitialize")
Cheers!