Convert Mason HTML into PDF

Hi RT-users,

I have a Mason HTML file like foo.html?id=777 (URL parameter id is
necessary!) and want to convert it to a pdf-file by clicking on a
Submit-Button. This button can have the name “Print”. The code in the
init-scope is supposed to look like that:

<%INIT>

Code that unnecessary for the problem.

if ($ARGS{“Primt”})
{
use PrintModule;
# print this file to bar.pdf
}

</%INIT>

Thanks in advance,

Wolfram