Converting HTML to PDF on Windows

Q:
When processing on Windows OS, how is an html file passed into Convert.ToPDF different from using the HTML2PDF module?

A:
When calling Convert.ToPdf, with an html file input, currently ONE of the following happens (in the order below currently)…

  1. If HTML2PDF module is available (for example from calling HTML2PDF.SetModulePath() before hand) then HTML2PDF is used.

  2. If MS Word is installed, then COM Interop is used to communicate with an MS Word process and use that as an intermediary.

  3. If PDFNet virtual printer is installed (Convert.InstallPrinter()) then we try to print using the default ‘print’ verb app (probably a browser). You can check this case by right clicking a .html file, selecting ‘print’. What ever app that launches is what our virtual printer will use.