Ghostscipt error -15

Ok, this is peculiar.

Downloaded 1.02 yesterday, installed it, and got to work this morning.

Intention is to use it to generate per-populated application forms from a website.  Using ASP.NET 4.

Easy enough.  I already have my form generator, into which I set a printsettings object with the default printer set to PDFCreator.

On PDFCreator I set it for autosave with no popup.

I then pipe the finished pdf to the webbrowser.

Now the problem...

The first dozen or so attempts after the code was complete worked just fine.  So great in fact that I started tidying my code up.  INitially I'd just used a dummy directory to create the pdfs to and a set file name.  So I changed it to use temp directory and temp file name.

It barfed, so my first reaction was to roll back to before I started cleanup.

And since that point, I have not been able to get it to work.

I added a listener to the error event, and it shows the error to be: 4, Ghostscript Error: '-15'!

In between times, I don't believe I changed anything.  I've rebooted my machine and so on.

I do have CutePDF, Foxit Reader and Adobe Reader on my machine.  I presume either of the first two might have versions of ghostscript installed with them.  However, they were installed before I started, so I'm still confused.

Anyone have any ideas?  This started off as such a promising day!

Cheers

An update to this.

Stepping through, the error occurs at the while statement in the following code block:

 

_pdf.cPrinterStop = false;

 

while ( _pdf.cCountOfPrintjobs != 0)

{

 Thread.Sleep(1000); 

}

 

_pdf.cClose();

If I step through the code, monitoring the state of cError, it is null at the first line, null as I step onto the while line, I can evaluate the property oc cCountOfPrintjobs with no error in the debugger.  When I then step forward, the error is raised.