Recent

Author Topic: Windows 10 print problem  (Read 20183 times)

korba812

  • Sr. Member
  • ****
  • Posts: 390
Windows 10 print problem
« on: August 25, 2016, 02:36:26 pm »
Hi!
I have strange bahaviour with printing reports on Windows 10. I can correctly print the first copy but another is not printed. Strangely, there is a job in the print queue, which ends (disappears from the list), but the entry is recorded in the event log (PrintService) as error. Another surprising thing is that the problem only affects some printers and other work fine. For example I can print without problems on my Samsung printer, but I can't with Microsoft PDF Printer or any HP printer that I tested (in one case program crash with error in some hp printer dll).
But, if I call Printer.Refresh before print another copy, everything works.
I think it's started to happen after the last major update of Windows 10.
And FreeReport compiled with BDS 2006 has exactly same behavior. I have no problem with printing from another applications or directly from code via TPrinter.

I join a sample project and event log info. Can anyone confirm this?

mirce.vladimirov

  • Sr. Member
  • ****
  • Posts: 256
Re: Windows 10 print problem
« Reply #1 on: August 25, 2016, 03:14:02 pm »
Quote
...problem only affects some printers and other work fine. For example I can print without problems on my Samsung printer, but I can't with Microsoft PDF Printer or any HP printer that I tested (in one case program crash with error in some hp printer dll).

Same here, problems only with one model, HP LaserJet Professional 1102, connected to 3 totaly different computers which don't have anything to do with each other (totaly different clients of mine).
Note: same model is widely used by many of my clients but only 3 computers (1 is win7, 1 win10, third I can't remember) do have a problem.

First print attempt goes all right,  all other attempts are reporting an error. The error reported in a pop-up window is "Printer is busy", but all other programs (office, firefox, chrome...) are able to print.
No problems at all if the client selects other printer.

korba812

  • Sr. Member
  • ****
  • Posts: 390
Re: Windows 10 print problem
« Reply #2 on: August 25, 2016, 06:48:41 pm »
I think I found the problem. For unknown reasons, some printers require re-create printer DC handle before each printing.
I add a patch for printers4lazarus that solves the problem (at least in my case).

I created a bug report
http://bugs.freepascal.org/view.php?id=30516
« Last Edit: August 25, 2016, 07:06:27 pm by korba812 »

MichaelBM

  • New Member
  • *
  • Posts: 38
Re: Windows 10 print problem
« Reply #3 on: August 25, 2016, 07:21:15 pm »
I had the same problem after installing latest update to Windows 10 (Pro version).

I'm using a HP LaserJet as a network printer, and it only printed one copy even though the code was set to two copies.

After a search on the HP website I found a tool created by HP that fixed the problem. Now everything works fine again without changes to the source code.
Development Tool: Lazarus 2.0.6 + FPC 3.0.4
Database: Firebird 2.5.7
Operating System: Windows 10 Pro 64-bit

korba812

  • Sr. Member
  • ****
  • Posts: 390
Re: Windows 10 print problem
« Reply #4 on: August 25, 2016, 07:30:22 pm »
Unfortunately, I have problems with other printers than HP. Eg. MS PDF Printer and MS XPS Printer.

rvk

  • Hero Member
  • *****
  • Posts: 6056
Re: Windows 10 print problem
« Reply #5 on: August 25, 2016, 08:04:10 pm »
After a search on the HP website I found a tool created by HP that fixed the problem. Now everything works fine again without changes to the source code.
Could you point us to that solution?
Had the solution something to do with reinstalling or repairing the printer-driver?

I also have a client who, when printing multiple tasks, only one task (randomly) is printed and the others not (after an update of Windows 10). I advised removing the printer completely and removing the driver from the "print server" settings and reinstalling the printer and driver again. (I haven't heard back from them)

(I can't reproduce the problem on my machines)

korba812

  • Sr. Member
  • ****
  • Posts: 390

fjabouley

  • Full Member
  • ***
  • Posts: 128
Re: Windows 10 print problem
« Reply #7 on: August 26, 2016, 05:11:05 pm »
Quite the same problem here, got a samsung printer,
When printing a report, the first print works but then the others don't. The print job then instantly disapear from printer's job list.
The only thing that works is to click on printer's properties (from the lazreport print dialog) and just press OK... then print again, and now it works.
It's super weird, I tried to uninstall the printer, etc...


I got three computers where the soft is installed (win8 x64, win8 32, and win10) the same issue is present.
All was working fine during 2 years, I don't understand why suddently it stopped working like 2 weeks ago...


Btw : I got a message from the samsung printer with a SPL Error (incomplete session by timeout) (h6fwsim/os_hook)


fjabouley

  • Full Member
  • ***
  • Posts: 128
Re: Windows 10 print problem
« Reply #8 on: August 26, 2016, 07:13:45 pm »
Thanx so much guys, it works with simply adding "Printer.Refresh"
I'm so glad, I thought my printer was dead !


mirce.vladimirov

  • Sr. Member
  • ****
  • Posts: 256
Re: Windows 10 print problem
« Reply #10 on: September 01, 2016, 10:45:33 pm »

korba812

  • Sr. Member
  • ****
  • Posts: 390
Re: Windows 10 print problem
« Reply #11 on: October 14, 2016, 09:47:05 pm »
After the recent updates it looks like back to normal and I can print without problem. Can anyone confirm that Microsoft has solved this problem?

rvk

  • Hero Member
  • *****
  • Posts: 6056
Re: Windows 10 print problem
« Reply #12 on: October 14, 2016, 09:54:16 pm »
After the recent updates it looks like back to normal and I can print without problem. Can anyone confirm that Microsoft has solved this problem?
Yes, it was resolved a month ago.

You can see come details at
https://support.seagullscientific.com/hc/en-us/articles/225047808-Windows-Update-causing-BarTender-errors
(it states all tested versions by BarTender Support Center)

Unfortunately now there are some other bugs that crept into the Windows updates  >:D
(like printing a pdf from Adobe reader gives black horizontal bars on some printers)
« Last Edit: October 14, 2016, 09:56:10 pm by rvk »

korba812

  • Sr. Member
  • ****
  • Posts: 390
Re: Windows 10 print problem
« Reply #13 on: October 15, 2016, 12:28:11 pm »
Thank you for confirmation.

 

TinyPortal © 2005-2018