View Single Post
Old 04-21-2017, 08:06 AM
Norrit Norrit is offline
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,274

You're not printing on an Epson, you're printing to PDF.
If you where printing to the Epson you shouldn't have seen that extra popup with the Cancel button with your code.
What is the code that you tried, because that one line output will not work when cancelling.
Place 3 text outputs and use the debugger. Easy if-construction (instead of the while) above each of the 3 output write actions and place a breakpoint on each. Perhaps an Application.ProcessMessages for each breakpoint if it doesn't work directly.
Run the code, breaking at the first breakpoint. Then Cancel and proceed untill the next. Validate the values of printer.printing and printer.aborted.
If printer.printer is still true ore printer.aborted is still false you're in trouble.
Since it's a feature of the Windows to Pdf I would say you should report this by Microsoft. It has nothing to do with programming language, you could easily reproduce it in any other language.
Reply With Quote