Problem with printing using WSD port lazarus / 39-Graphics ---------------------------------------------------------------------- domasz · 2023-09-09 17:43 My application is printing just fine on printers I tested but one user informed me it doesn't print on his printer which uses WSD port. All other programs he has print just fine. I am not doing anything fancy, just: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  if PrintDialog1.Execute then begin    Printer.BeginDoc ;    //drawing on Printer.Canvas    Printer.EndDoc; end; The user says the document shows in the printer queue but the printer is not activated. How can I fix that? ---------------------------------------------------------------------- rvk · 2023-09-09 17:56 If it ends up in the queue then it's out of your hands. It's up to Windows. The other printer driver could sent Invalid commands. The printer might be offline. Is the printerdriver waiting for certain paper? Did the user restart the computer? Etc. Does the job stay in the print queue? If it does, what status does it have? ---------------------------------------------------------------------- domasz · 2023-09-09 18:07 Thanks, I will ask for more info. The user isn't an idiot so I assume the printer must be online and there must be paper in. ---------------------------------------------------------------------- MichaelBM · 2023-09-10 07:32 I had the same problem and this soldved it: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i if PrintDialog1.Execute then begin  Printer.Refresh;  Printer.BeginDoc ;  //drawing on Printer.Canvas  Printer.EndDoc;end; ---------------------------------------------------------------------- rvk · 2023-09-10 07:44 Quote from: MichaelBM on September 10, 2023, 09:32:33 amI had the same problem and this soldved it: If Printer.Refresh helps this could be due to a very old bug in Windows 10 from 2016. It shouldn't be there anymore, unless the user is running a very old unpatched system or the bug is reintroduced. https://forum.lazarus.freepascal.org/index.php/topic,33815.msg220349.h tml#msg220349 But back then it did print one copy. I didn't see that mentioned here. But it is useful to check these things (adding refresh, asking if one copy printed, etc). Printer name and OS (and if updated to latest) is useful information too.