Hi Leonardo,
Is it somehow possible to generate pdf for web screens that require authentication? i.e that are not marked as anonymous?
Report Manager and project web screens are all located in the same domain.
Thanks in advance,
Sérgio Silva
Hi Sérgio. The latest version has support for rendering a non-anonymous web screen to PDF, if you use the ScreenToPDF web block. You can download the demo and open it in Service Studio to see how to use it (the demo has an anonymous screen, but it works just the same with non-anonymous ones).
I will spend a couple days/weeks writing documentation for this component. So if something is not clear or easy to use, please let me know, that will help me a lot.
leonardo.fernandes wrote:
Where should I got to download the demo? I thought I have checked everywhere, but clearly I am missing something as I cannot find it.
Thank you in advance,
trav
Leonardo Fernandes wrote:
I tried what u said but it's not working correctly. what i got that is like when i use ScreenToPDF and place our desired data on Content WebBlock that doesn't print in the PDF file PDF file should be download / Open Blank Page. something is wrong in web block. can u check that once again? and also it doesn't support for non-anonymous user. please check and let us know.
Waiting for replay.
Thanks,
Jay
Hi Sérgio. It will be possible to do that, on a future release.
For now, you can work around that by creating a short-lived token before the call to PrintPDF, commit the transaction, then pass this token into your web screen. The web screen should validate the token against the database, and reject if it doesn't find it (or if it is expired).
I'll let you know when I release that feature.
Is there some fix available for converting into pdf non-anonymous page using Timer,Or shall we still follow your work around.
Varun.
Hi Travis,
You can check it here:
Regards,
Marcelo
Marcelo Ferreira wrote:
Thank you Marcelo,
I have never noticed that option before. I have only installed apps from Service Studio and it appears the multiple options isn't supported yet.
Thank you again!
Does it work for non-anonymous web screen in a timer? The action inside the timer is using the PrintToPDF_Advanced component. All I get is a pdf of the login screen. I can't seem to download the demo. I am on version 10. Is there a version 10 demo?
My scenario is to generate a bunch of pdfs and save them to the database. Then email them out.
Hi Mark. The timer doesn't have a session, so non-annonymous screens are of course rejected in that context.
For this scenario, the workaround I've given above still applies:
Create a short-lived token before the call to PrintPDF, commit the transaction, then pass this token into your web screen. The web screen should validate the token against the database, and reject if it doesn't find it (or if it is expired).
I got it working. Thanks Leonardo.
Mark Jurkovich wrote:
Hi Mark,
I am new to Outsystems platform. Can you please guide me how exactly you have done it in Outsystems?
I need to generate PDF (from specific div of the html) using Timer.
Thanks for this - I've tested it and now have it working on a non-anonymous web screen, but it still requires the "registered" role. I have a user role specific to my application, can I check for that instead of just "Registered"?
Hi Steve, I had the same question but it seems to be working on my end (see example attached) - for user role specific use cases, as well - but as long as you're printing screens with the user in context (i.e. logged-in in the same browser that you're requesting the printing to be done). So this will still not work if you're printing screens from a background job (e.g. Timer or Process) since there is no user in context there. Hope this helps.