0

I'm writing a C# program that is supposed to serve as an intermediate step inside a PDFCreator workflow, while a document is being printed.

It's a regular console program and it works fine when everything else is fine. The root problem, as I've discovered, is that there is currently (i.e. in PDFCreator v4.1.3) no way to cancel the print job from inside my program, should the need arise. PDFCreator simply doesn't check the exit code and continues onto the next step regardless of what happened in my program.

Having exhausted the obvious options I've naturally resorted to the only way I could think of: killing the parent process from inside my app. This works, sort of. It cancels the immediate printing process.

But the problem starts again when I try to print another document. As it turns out, PDFCreator remembers the pending printing task as soon as the workflow starts. If it is killed before finishing, it stays in its queue and is retried the next time. This means the the tasks accumulate when I kill them!

I haven't had any success trying to determine where exactly the PDFCreator stores these pending tasks, so I can't delete them. And so I'm stuck.

I've raised the issue on the PDFCreator forum, but the community there seems to be rather slow to respond.

halfer
  • 19,824
  • 17
  • 99
  • 186
aoven
  • 2,248
  • 2
  • 25
  • 36
  • It seems to be an 'old' problem, see: https://forums.pdfforge.org/t/impossible-to-delete-documents-from-the-pdf-creator-queue/299 – Luuk Oct 24 '20 at 15:10
  • @Luuk: I'm afraid you might have misunderstood my question. I'm not having a problem with canceling the job from print queue. I'm trying to cancel the job BEFORE it even reaches the print queue. It's a completely different kind of problem, even though it might look similar on first glance. :) The critical part is when I mentioned that my program is called from PDFCreator's workflow. That is, when an app is sending a document to print, PDFCreator calls my app, which then determines that the document shouldn't be printed. I'm looking for a way to communicate this back to PDFCreator. – aoven Oct 25 '20 at 16:10
  • OK, sorry I mus understood the problem, hope you will get a quick response on the PDFCreator forum. I did use this product (10 years ago) and stopped using it when they introduced PDFArchitect (and I did not like the interface...) – Luuk Oct 25 '20 at 17:12

0 Answers0