Workaround for Printing from Delphi (or the Delphi IDE): three strikes and you get “Printer is not currently printing.” – yes I mentioned “Delphi 8!”

Recently when printing the 3rd time and up, you get this error in many Delphi programs and the Delphi IDE:

Printer is not currently printing.

In the past this only occurred when you used a TPrinter and forgot to call BeginDoc.

But now it always occurs after reusing the same TPrinter instance for the 3rd time and up. Since the Delphi Galileo based IDEs (8 and higher; likely older ones as well: the source code printing hasn’t changed in a long time). The error actually occurs twice: after starting a source code print job, but also after cancelling the same failed source code print job.

This article describes printing issues that occur after any of the security updates that are described in Microsoft Security Bulletin MS16-098 are installed in Windows. You can fix these issues by installing the update that is described in this article. Before you install this update, check out the Prerequisites section.