HTML to PDF Anonymous Screen

HTML to PDF Anonymous Screen

  
Hi,

I am trying to publish a webscreen to PDF using the HTMLtoPDF component. To do this, I also have to set the screen roles to 'anonymous'. The problem now is I am not able to pass the 'Session.UserId' parameter to the screen (I will be putting the name of the user who prepared the document).

Is there anyway to get around this without recoding everything using StringBuilder (create the HTML code)?

Regards,
JC
use an inputParameter on that screen that is being filled with session.userid.
So the page itself will have nothing to do with session-variables

I just forgot to mention it in the original post but I already tried passing an input parameter with Session.UserId. It didn't work so what I did next was to query first the UserId using the Session.UserId in the source webscreen and then pass it to the 'Anonymous Screen'. Again it didn't work.

Then I tried querying out the name using the Session.UserId as a parameter in a 'GetUserById' advance query in the source webscreen to simply pass the name of the user to that 'Anonymous Screen'. Again it didn't work.
what do you mean by  "it didn't work" ?
what is not working?

Do you get an empty pdf?
If you just dump the parameter on the screen as an expression, what do you see?
If you access the pdf-screen directly in a (private) browser, what does it show?







Above is the webscreen that I am generating. The whole PDF is generated successfully but the expression beside the 'Prepared By' is blank.

The values I used for the Expression as I explained earlier are:

Session.UserId
Query.User.Name (query by userid = Session.UserId)
Query.User.Name (query by userid = Session.UserId (input parameter of the screen))
Query.User.Name (query by userid = UserId (input parameter of the screen))
Name (input parameter of the screen)

All returned 'blank' value.
err, yeah.

can you give a simple oml for it?
and what is the url you are using?

should be something like http://<foobar>/PDFScreen.aspx?UserId=345



Statler & Waldorf and the amazing flappy tweedles! wrote:
should be something like http://<foobar>/PDFScreen.aspx?UserId=345
 
Now I got it through your clue. I missed adding the UserId parameter in the URL. thank you and sorry for your time.

:noob:
Even so, how could you get blank from a input parameter on the screen?
Nuno Reis wrote:
Even so, how could you get blank from a input parameter on the screen?
 Since the User is part of the preparation of the screen, not declaring it as a part of the URL will pass a 'null' value for the input parameter.
 
hi guys,
how can i generate my webscreen as a pdf report?
how can i use pdf crowd to do this?
i need only generate a webscreen at pdf format.
Thanks
Hi,

You can download and try the component Html to PDF/Image Converter from the forge. We have using this to generate PDFs and I am surprised that it now has Image Conversion capabilities (good job).

Regards,