make pg-output and output to iframe or a new window