If I run such a print-macro directly within the desktop client I get the same result as you and canceling the prints by pressing the enter-key in the "right" time.
But if I start this per qmc-task (which called an EXECUTE statement within a qvw which called a windows task which started the desktop client within a new instance and opened and reload the print-application and the macro will be triggerred from the reload) the printing happens within the background. The progress dialog will be visible but get not the focus. Maybe you could adapt this approach in any way.
If this don't worked you could try it with a different pdf-printer and/or trying to adjust the printer/OS settings (whereby I think this will be quite hard).