Hi, We are able to configure Universal Document Coverter as default printer, and invoke a print using IE object as shown in below code. However, MHT documents having multiple frames is ending up generating multiple images for each frame. We also need to limit this print to 1st page of the document. Appreciate any thoughts on using any other IE DLLs available which can be used to avoid multiple frame issue and limiting the print to 1st page of the document.
using System;
using System.Collections.Generic;
using System.Text;
using SHDocVw;
using System.Threading;
namespace htmconverter
{
class Program
{
static void Main(string[] args)
{
object missingValue = Type.Missing;
InternetExplorer iexp = new InternetExplorer();
iexp.Navigate("file://c:/c.mht", ref missingValue, ref missingValue, ref missingValue, ref missingValue);
// while(OLECMDID.OLECMDID_PRINT!=OLECMDF.OLECMDF_SUPPORTED)
iexp.ExecWB(OLECMDID.OLECMDID_PRINT, OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER, ref missingValue, ref missingValue);
Thread.Sleep(2000);
}
}
}