Generate a temporary static page

Generate a temporary static page

  
Hi all,

I am trying to use the Html to PDF/Image Converter Extension and from what i've read and experimented a public (for anonymous access) page is needed in order for the converter to correctly see the content of the page, otherwise it would just see the login page.

What i need is a way to generate a temporary html page that i can pass to the extension through an URL. So the question is: how do i generate a temporary html file that i can use and then delete it?

Thanks for your responses,
Best regards,
Emanuel Silva
That's really not the right way to do it.

A better way that I have used in the past, is to create a clone of the page that requires authentication, but allow anonymous access. But... instead of passing in the standrd ID values, (say, "customer=54") which is not something you want to make public, you give the entity a "public id" field... say... 50 character text, and populate it with random text (use the GeneratePassword(50, True) function for this... and query the DB to make sure you never accidentally use duplicate values... basically you generate it, query, if query.count > 0 go back to the generation, otherwise move on). Then use THAT data as the parameter to the public page, and in Preparation pull the record up by that value.

This gives you a page that is 1) hard to find in the first place(nothing will refer to it), 2) public so the HTML to PDF stuff can find it and 3) very difficult to make it show anything even if you found it.

J.Ja
Could you not place the html2pdf pages inside it's own screenflow and make it internal-only?

After all, you access those pages via an action and use a download-node?
Joost -

That's an excellent idea as well. I was using my "public key" system specifically because the page *had* to be accessible by a non-user third party (our clients' customers through a "customer portal") without a login, so I needed it anyways.

J.Ja
Thank you for both responses.

Joost's idea suits my problem best, but it's nice to have different solutions for the same problem. I'll try them both and then i'll give feedback on my experience.

Regards,
Emanuel Silva