I am implementing COM interface in C#.
I have initiated JobQueue and called pdfCreatorObj.PrintFile(filepath). After this, the job didn’t reach the jobqueue.
Following is the code snippet:
if (pdfCreator.IsInstanceRunning)
{
pdfCreator.PrintFile(srcFileFullName);
// Wait till doc gets queued up.
while (jobQueue.Count != 1)
{
if (starttime.AddSeconds(timeout) < DateTime.Now)
{
WriteToLog("", "Loading document timedout", LogLevel.ERROR );
throw new Exception ("Failed to load the document:"+srcFileFullName +"
for printing");
}
}
PrintJob printJob = jobQueue.NextJob;
printJob.SetProfileByGuid("DefaultGuid");
printJob.ConvertTo(finalFileFullName);
}
From the above code I am always getting the exception: “Failed to load the document”