[Ultimate PDF] How to generate PDF for non anonymous web screens ?

Forge Component
(5)
Published on 8 May by leonardo.fernandes
5 votes
Published on 8 May by leonardo.fernandes

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. 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.

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:

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.

Hi Leonardo,

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


Hi Travis,

You can check it here:

Regards,

Marcelo

Marcelo Ferreira wrote:

Hi Travis,

You can check it here:

Regards,

Marcelo

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!

trav


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).

leonardo.fernandes wrote:

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.