I'm trying to implement an Html to Pdf conversion service using a Wcf service hosted in IIS and am encountering problems with the amount of memory consumed by the conversion process. When the service is hosted in IIS it is peaking at about 900MB of memory for the IIS process (only the 1 application in the pool) and then drops down to about 300MB and stays there. The same service hosted in Cassini (the Visual Studio test web server) uses only about 50MB and drops down to 30MB afterwards. The same code run in a Console application also uses about 50MB.
I have attached the code for the service and test application to call it. Also included is an Html file to convert.