Access forbidden. An instance of PDFCreator is currently running.

When I create an object
When loading the Queue. This error has occurred.

var jobQueue = CreateQueue();
jobQueue.Initialize();

Initialize has an error

Hi,

you can use the IsInstanceRunning bool as described here:
http://docs.pdfforge.org/pdfcreator/3.3/en/pdfcreator/com-interface/reference/pdfcreator/
before initializing the queue to check if PDFCreator is already running.

Best regards

Robin

can you give me example?I don't know where to use it.

Before initializing the queue e.g.

    var PDFCreatorObject = new ActiveXObject("PDFCreator.PDFCreatorObj");
    if (PDFCreatorObject.IsInstanceRunning)
    {
     x = new ActiveXObject("WScript.Shell");
     x.run("taskkill.exe /im PDFCreator.exe");
    }

Or just pop up a message box and ask the user to close PDFCreator manually if you don't want to directly terminate the process.

Dear Robin,
Thank you very much for your reply, this is very helpful to me. In addition, I still have a question, how to get the PDFCreator printed file in the script? Develop language using C#.

I am not sure I understand the question correctly, do you mean how to print a file to the PDFCreator printer in c#?
If yes, have a look at the code we use for PDFCreator:

best regards

Robin

Hello,

I am running into "ComImplementation An instance of PDFCreator is currently running" too. I use taskkill, no PDFCreator instance is visible in taskmanager, releasing com correctly, but still I often get this message and must restart my application.

Please help.