From Andre Guirard:
The first thing the agent should do is:
Print "Content-Type: text/plain"
Print "Content-Type: text/html" PrintEverything else you output from the agent is under your control.
Forms and Pages
Selecting the "Treat contents as HTML" form option will disable generation of any headers by Domino.
Embed the view in a page that has "Treat contents as HTML" option selected. Select HTML display for the embedded view.