210
Views
4
Comments
Solved
[Ultimate PDF] Get PDF Binary blob
ultimate-pdf
Reactive icon
Forge asset by Leonardo Fernandes
Application Type
Reactive

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

2019-07-08 11-04-35
Leonardo Fernandes
 
MVP
Solution

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.

UserImage.jpg
vikas sharma
Champion

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.

2020-09-21 08-42-47
Vincent Koning

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.


2019-07-08 11-04-35
Leonardo Fernandes
 
MVP
Solution

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.

UserImage.jpg
Keith Oon

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!

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